%PDF- %PDF-
Direktori : /home/opti/workflow/src/models/ |
Current File : /home/opti/workflow/src/models/store.js |
'use strict'; module.exports = (sequelize, DataTypes) => { const Store = sequelize.define('Store', { uuid: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, orgId: DataTypes.INTEGER, name: DataTypes.STRING, description: DataTypes.STRING, location: DataTypes.STRING, referenceNumber: DataTypes.STRING, createdBy: DataTypes.INTEGER }, {}); Store.associate = function(models) { // associations can be defined here Store.hasMany(models.Item, {foreignKey: 'storeId', as: 'items'}) }; return Store; };