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.
84 lines
2.3 KiB
84 lines
2.3 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const ResourceAccess = sequelize.define("resourceAccess", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "ID唯一标识",
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "t_resource_access_id_uindex"
|
|
},
|
|
resourceName: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "资源名称",
|
|
primaryKey: false,
|
|
field: "resource_name",
|
|
autoIncrement: false
|
|
},
|
|
resourceDesc: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "资源描述",
|
|
primaryKey: false,
|
|
field: "resource_desc",
|
|
autoIncrement: false
|
|
},
|
|
resourceCount: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "资源数",
|
|
primaryKey: false,
|
|
field: "resource_count",
|
|
autoIncrement: false
|
|
},
|
|
resourceType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "资源类型",
|
|
primaryKey: false,
|
|
field: "resource_type",
|
|
autoIncrement: false
|
|
},
|
|
user: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "访问用户",
|
|
primaryKey: false,
|
|
field: "user",
|
|
autoIncrement: false,
|
|
references: {
|
|
key: "id",
|
|
model: "tUser"
|
|
}
|
|
},
|
|
time: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "访问时间",
|
|
primaryKey: false,
|
|
field: "time",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "t_resource_access",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.ResourceAccess = ResourceAccess;
|
|
return ResourceAccess;
|
|
};
|