floriday/models/warehouse/warehouse.js

58 lines
1.2 KiB
JavaScript

import { Sequelize } from 'sequelize';
const warehouse = {
warehouseId: {
type: Sequelize.STRING,
primaryKey: true,
},
name: {
type: Sequelize.STRING,
},
location_gln: {
type: Sequelize.STRING,
},
location_address_addressLine : {
type: Sequelize.STRING,
},
location_address_city: {
type: Sequelize.STRING,
},
location_address_countryCode: {
type: Sequelize.STRING,
},
location_address_postalCode: {
type: Sequelize.STRING,
},
location_address_stateOrProvince: {
type: Sequelize.STRING,
},
isDeleted: {
type: Sequelize.BOOLEAN,
},
sequenceNumber: {
type: Sequelize.INTEGER,
},
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(
'warehouse',
warehouse, {
timestamps: false,
freezeTableName: true,
}
);
};