floriday/models/supplyLine/supplyLine.js

79 lines
1.6 KiB
JavaScript

import { Sequelize } from 'sequelize';
const supplyLine = {
supplyLineId: {
type: Sequelize.STRING,
primaryKey: true,
},
status: {
type: Sequelize.STRING,
},
numberOfPieces : {
type: Sequelize.INTEGER,
},
deliveryPeriodStartDateTime: {
type: Sequelize.DATE,
},
deliveryPeriodEndDateTime: {
type: Sequelize.DATE,
},
orderPeriodStartDateTime: {
type: Sequelize.DATE,
},
orderPeriodEndDateTime: {
type: Sequelize.DATE,
},
warehouseId: {
type: Sequelize.STRING,
},
sequenceNumber: {
type: Sequelize.INTEGER,
},
type: {
type: Sequelize.STRING,
},
isDeleted: {
type: Sequelize.BOOLEAN,
},
salesUnit: {
type: Sequelize.STRING,
},
agreementReferenceCode: {
type: Sequelize.STRING,
},
agreementReferenceDescription: {
type: Sequelize.STRING,
},
isLimited: {
type: Sequelize.BOOLEAN,
},
isCustomerSpecific: {
type: Sequelize.BOOLEAN,
},
tradeItemId : {
type: Sequelize.STRING,
},
organizationId : {
type: Sequelize.STRING,
},
lastSync: {
type: Sequelize.DATE,
allowNull: false,
defaultValue: Sequelize.NOW,
},
created: {
type: Sequelize.DATE,
allowNull: false,
defaultValue: Sequelize.NOW,
},
};
export default (sequelize) => {
return sequelize.define(
'supplyLine',
supplyLine, {
timestamps: false,
freezeTableName: true,
}
);
};