szj_access_role.js 880 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. module.exports = app => {
  3. const DataTypes = app.Sequelize;
  4. const sequelize = app.model;
  5. const attributes = {
  6. roleId: {
  7. type: DataTypes.INTEGER(10).UNSIGNED,
  8. allowNull: false,
  9. defaultValue: null,
  10. primaryKey: true,
  11. autoIncrement: false,
  12. comment: "角色ID",
  13. field: "role_id"
  14. },
  15. accessId: {
  16. type: DataTypes.STRING(5000),
  17. allowNull: false,
  18. defaultValue: null,
  19. primaryKey: false,
  20. autoIncrement: false,
  21. comment: "节点ID",
  22. field: "access_id"
  23. }
  24. };
  25. const options = {
  26. tableName: "szj_access_role",
  27. comment: "",
  28. indexes: [{
  29. name: "access_id",
  30. unique: false,
  31. type: "BTREE",
  32. fields: ["access_id"]
  33. }]
  34. };
  35. const SzjAccessRoleModel = sequelize.define("szjAccessRoleModel", attributes, options);
  36. return SzjAccessRoleModel;
  37. };