import { Model, DataTypes } from 'sequelize'; import { sequelize } from '../../../utils/sequelize.js'; class Inventory extends Model { } Inventory.init({ stock_id: { type: DataTypes.INTEGER, allowNull: false, }, product_id: { type: DataTypes.INTEGER, allowNull: false, }, quantity: { type: DataTypes.INTEGER, allowNull: false, }, quality: { type: DataTypes.INTEGER, allowNull: false, }, produced_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW, } }, { sequelize, modelName: 'Inventory', tableName: 'inventory', schema: 'falukant_data', timestamps: false, underscored: true, , freezeTableName: true}); export default Inventory;