floriday/models/organization/warehouses.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

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