floriday/models/config/warehouseConfig.js

34 lines
655 B
JavaScript

import { Sequelize } from 'sequelize';
const warehouseConfig = {
warehouseFk: {
type: Sequelize.INTEGER,
primaryKey: true,
allowNull: false,
},
entryFk: {
type: Sequelize.INTEGER,
},
travellingDays: {
type: Sequelize.INTEGER,
default: 0,
allowNull: false,
},
dayRange: {
type: Sequelize.INTEGER,
default: 0,
allowNull: false,
},
};
export default (sequelize) => {
return sequelize.define(
'warehouseConfig',
warehouseConfig,
{
timestamps: false,
freezeTableName: true,
}
);
};