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.
76 lines
1.6 KiB
76 lines
1.6 KiB
const sequelize = require("sequelize"); |
|
const db = require("../Config/db"); |
|
|
|
|
|
// what is this use for ? |
|
|
|
const DataModel = db.define( |
|
"BCDATA", |
|
{ |
|
ID: { |
|
type: sequelize.INTEGER, |
|
primaryKey: true, |
|
autoIncrement: true, |
|
}, |
|
DB_CODE: { |
|
type: sequelize.STRING, |
|
primaryKey: true, |
|
}, |
|
DATA_CODE: { |
|
type: sequelize.STRING, |
|
}, |
|
DATA_NAME: { |
|
type: sequelize.STRING, |
|
}, |
|
DATA_DESC: { |
|
type: sequelize.STRING, |
|
}, |
|
DATA_TYPE: { |
|
type: sequelize.STRING, |
|
}, |
|
// AREA_ID |
|
FIELD_1: { |
|
type: sequelize.STRING, |
|
}, |
|
// Sale type |
|
FIELD_2: { |
|
type: sequelize.STRING, |
|
}, |
|
// Warehouse |
|
FIELD_3: { |
|
type: sequelize.STRING, |
|
}, |
|
// sianad code for area |
|
FIELD_4: { |
|
type: sequelize.STRING, |
|
}, |
|
FIELD_5: { |
|
type: sequelize.STRING, |
|
}, |
|
FIELD_6: { |
|
type: sequelize.STRING, |
|
}, |
|
FIELD_7: { |
|
type: sequelize.STRING, |
|
}, |
|
FIELD_8: { |
|
type: sequelize.STRING, |
|
}, |
|
FIELD_9: { |
|
type: sequelize.STRING, |
|
}, |
|
CREATED_DATE: { |
|
type: sequelize.STRING, |
|
}, |
|
CREATED_BY: { |
|
type: sequelize.STRING, |
|
}, |
|
}, |
|
{ |
|
timestamps: false, |
|
freezeTableName: true, |
|
} |
|
) |
|
|
|
DataModel.removeAttribute("id") |
|
module.exports = DataModel
|
|
|