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,
|
|
|
|
},
|
2023-05-17 08:24:10 +00:00
|
|
|
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(
|
2023-05-17 08:24:10 +00:00
|
|
|
'organization_warehouses',
|
2023-05-16 08:24:04 +00:00
|
|
|
warehouses, {
|
|
|
|
timestamps: false,
|
|
|
|
freezeTableName: true,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
return Warehouses;
|
|
|
|
};
|