"use strict";
const {
Model
} = require("sequelize");
module.exports = (sequelize, DataTypes) => {
class Department extends Model {
static associate(models) {
Department.hasMany(models.Command);
Department.hasMany(models.User);
}
Department.init({
name: {
type: DataTypes.STRING,
primaryKey: true
}, {
sequelize,
modelName: "Department",
});
return Department;
};