56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
import { Sequelize } from 'sequelize';
|
|
|
|
const tradeItem = {
|
|
tradeItemId: {
|
|
type: Sequelize.STRING,
|
|
primaryKey: true,
|
|
},
|
|
code: {
|
|
type: Sequelize.STRING
|
|
},
|
|
gtin: {
|
|
type: Sequelize.STRING
|
|
},
|
|
vbnProductCode: {
|
|
type: Sequelize.STRING
|
|
},
|
|
name: {
|
|
type: Sequelize.STRING
|
|
},
|
|
isDeleted: {
|
|
type: Sequelize.BOOLEAN,
|
|
},
|
|
sequenceNumber: {
|
|
type: Sequelize.INTEGER,
|
|
},
|
|
tradeItemVersion: {
|
|
type: Sequelize.INTEGER,
|
|
},
|
|
isCustomerSpecific: {
|
|
type: Sequelize.BOOLEAN,
|
|
},
|
|
isHiddenInCatalog: {
|
|
type: Sequelize.BOOLEAN,
|
|
},
|
|
supplierOrganizationId: {
|
|
type: Sequelize.STRING
|
|
},
|
|
lastSync: {
|
|
type: Sequelize.DATE,
|
|
allowNull: false,
|
|
defaultValue: Sequelize.NOW,
|
|
},
|
|
created: {
|
|
type: Sequelize.DATE,
|
|
allowNull: false,
|
|
defaultValue: Sequelize.NOW,
|
|
},
|
|
};
|
|
|
|
export default (sequelize) => {
|
|
const TradeItem = sequelize.define('tradeItem', tradeItem, {
|
|
timestamps: false,
|
|
freezeTableName: true,
|
|
});
|
|
return TradeItem;
|
|
}; |