const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('model_has_permissions', {
    permission_id: {
      allowNull: false,
      primaryKey: true,
      type: DataTypes.UUID,
      defaultValue: DataTypes.UUIDV4
    },
    model_type: {
      type: DataTypes.STRING(191),
      allowNull: false
    },
    model_id: {
      type: DataTypes.UUID,
      allowNull: false
    }
  }, {
    sequelize,
    tableName: 'model_has_permissions',
    timestamps: false
  });
};
