OCA_Backend/api/models/role.js

26 lines
600 B
JavaScript
Raw Normal View History

2022-01-22 13:36:44 +00:00
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class role extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
static associate(models) {
// define association here
}
}
role.init({
name: DataTypes.STRING,
status: DataTypes.INTEGER,
createdBy: DataTypes.INTEGER,
updateBy: DataTypes.INTEGER
}, {
sequelize,
modelName: 'role',
});
return role;
};