floriday/models/warehouse/warehouse.js

58 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-05-16 08:24:04 +00:00
import { Sequelize } from 'sequelize';
const warehouse = {
2023-05-16 08:24:04 +00:00
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: {
2023-05-16 08:24:04 +00:00
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, {
2023-05-16 08:24:04 +00:00
timestamps: false,
freezeTableName: true,
}
);
};