department.js 341 B

123456789101112131415161718
  1. const Sequelize = require('sequelize')
  2. const { defineModel } = require('./base')
  3. const Department = defineModel('department', {
  4. id: {
  5. type: Sequelize.BIGINT,
  6. autoIncrement: true,
  7. primaryKey: true
  8. },
  9. name: {
  10. type: Sequelize.STRING(50),
  11. comment: '岗位名称'
  12. }
  13. })
  14. Department.sync()
  15. module.exports = Department