You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.1 KiB
104 lines
2.1 KiB
9 months ago
|
const sequelize = require("sequelize")
|
||
|
const db = require("../Config/db");
|
||
|
|
||
|
const ItemModel = db.define(
|
||
|
'TDITEMS',
|
||
|
{
|
||
|
ITEM_CODE: {
|
||
|
type: sequelize.STRING,
|
||
|
primaryKey: true
|
||
|
},
|
||
|
ITEM_BCODE: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_DESC: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
|
||
|
ITEM_TYPE: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
|
||
|
UNIT_STOCK: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
|
||
|
ITEM_COST1: {
|
||
|
type: sequelize.INTEGER
|
||
|
},
|
||
|
|
||
|
ITEM_PRICE1: {
|
||
|
type: sequelize.INTEGER
|
||
|
},
|
||
|
UNIT_SALE: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
|
||
|
ITEM_COST2: {
|
||
|
type: sequelize.INTEGER
|
||
|
},
|
||
|
ITEM_PRICE2: {
|
||
|
type: sequelize.INTEGER
|
||
|
|
||
|
},
|
||
|
CAT_CODE: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_STAT: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
|
||
|
ITEM_CUS1: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS2: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS3: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS4: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS5: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS6: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS7: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS8: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS9_KH: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
ITEM_CUS10_KH: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
USER_CREA: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
DATE_CREA: {
|
||
|
type: sequelize.DATE
|
||
|
},
|
||
|
USER_UPDT: {
|
||
|
type: sequelize.STRING
|
||
|
},
|
||
|
DATE_UPDT: {
|
||
|
type: sequelize.DATE
|
||
|
},
|
||
|
ITEM_IMG: {
|
||
|
type: sequelize.BLOB,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
timestamps: false,
|
||
|
freezeTableName: true,
|
||
|
}
|
||
|
)
|
||
|
|
||
|
ItemModel.removeAttribute('id')
|
||
|
module.exports = ItemModel;
|