1234567891011121314151617181920212223242526272829303132333435363738 |
- 'use strict';
- module.exports = app => {
- const DataTypes = app.Sequelize;
- const sequelize = app.model;
- const attributes = {
- roleId: {
- type: DataTypes.INTEGER(10).UNSIGNED,
- allowNull: false,
- defaultValue: null,
- primaryKey: true,
- autoIncrement: false,
- comment: "角色ID",
- field: "role_id"
- },
- accessId: {
- type: DataTypes.STRING(5000),
- allowNull: false,
- defaultValue: null,
- primaryKey: false,
- autoIncrement: false,
- comment: "节点ID",
- field: "access_id"
- }
- };
- const options = {
- tableName: "szj_access_role",
- comment: "",
- indexes: [{
- name: "access_id",
- unique: false,
- type: "BTREE",
- fields: ["access_id"]
- }]
- };
- const SzjAccessRoleModel = sequelize.define("szjAccessRoleModel", attributes, options);
- return SzjAccessRoleModel;
- };
|