Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
SOD/models/department.js

22 lines
430 B
JavaScript

"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;
};