%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/workflow/src/models/
Upload File :
Create Path :
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;
};

Zerion Mini Shell 1.0