floriday/models/tradeItem/packingConfigurations.js

48 lines
1013 B
JavaScript

import { Sequelize } from 'sequelize';
const packingConfigurations = {
packingConfigurationId: {
type: Sequelize.STRING,
primaryKey: true,
},
piecesPerPackage: {
type: Sequelize.INTEGER,
},
bunchesPerPackage: {
type: Sequelize.INTEGER,
},
photoUrl: {
type: Sequelize.STRING,
},
packagesPerLayer: {
type: Sequelize.INTEGER,
},
layersPerLoadCarrier: {
type: Sequelize.INTEGER,
},
additionalPricePerPiece: {
type: Sequelize.STRING,
},
transportHeightInCm: {
type: Sequelize.INTEGER,
},
loadCarrierType: {
type: Sequelize.STRING,
},
isPrimary: {
type: Sequelize.BOOLEAN,
},
};
export default (sequelize) => {
const PackingConfigurations = sequelize.define(
'packingConfig',
packingConfigurations,
{
timestamps: false,
freezeTableName: true,
}
);
return PackingConfigurations;
};