UNPKG

auth-center

Version:
35 lines (32 loc) 722 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; function _default(sequelize, DataTypes) { return sequelize.define('Role', { user_id: { type: DataTypes.BIGINT.UNSIGNED, allowNull: false, comment: 'User Id' }, client_id: { type: DataTypes.STRING(100), allowNull: false, comment: 'Client Id' }, role: { type: DataTypes.STRING(100), allowNull: false, comment: 'Role' } }, { tableName: 'role', comment: 'Role Table, user roles of the clients', indexes: [{ unique: true, fields: ['user_id', 'client_id', 'role'] }] }); } module.exports = exports.default;