You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
47 lines
1.0 KiB
/* eslint-disable*/
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const RoleResource = sequelize.define("roleResource", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "role_resource_id_uindex"
|
|
},
|
|
roleId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "role_id",
|
|
autoIncrement: false,
|
|
references: {
|
|
key: "id",
|
|
model: "tRole"
|
|
}
|
|
},
|
|
resourceCode: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "resource_code",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "role_resource",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.RoleResource = RoleResource;
|
|
return RoleResource;
|
|
};
|