2023-01-09 10:59:07 +00:00
|
|
|
import { Sequelize } from 'sequelize';
|
2022-12-05 12:53:30 +00:00
|
|
|
|
|
|
|
const tradeItem = {
|
|
|
|
id: {
|
|
|
|
type: Sequelize.INTEGER,
|
|
|
|
primaryKey: true,
|
|
|
|
autoIncrement: true,
|
|
|
|
},
|
|
|
|
tradeItemId: {
|
2023-01-10 12:24:43 +00:00
|
|
|
type: Sequelize.UUID,
|
|
|
|
unique: true,
|
2022-12-05 12:53:30 +00:00
|
|
|
},
|
|
|
|
supplierOrganizationId: {
|
|
|
|
type: Sequelize.UUID
|
|
|
|
},
|
|
|
|
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,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default (sequelize) => {
|
2023-01-09 10:59:07 +00:00
|
|
|
const TradeItem = sequelize.define('FDtradeItem', tradeItem, {
|
2022-12-05 12:53:30 +00:00
|
|
|
timestamps: false,
|
|
|
|
freezeTableName: true,
|
|
|
|
});
|
|
|
|
return TradeItem;
|
|
|
|
};
|