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.
71 lines
1.6 KiB
71 lines
1.6 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const ResourceCatalog = sequelize.define("resourceCatalog", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "唯一标识",
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
unique: "t_resource_catalog_id_uindex"
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "名称",
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
code: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "代码",
|
|
primaryKey: false,
|
|
field: "code",
|
|
autoIncrement: false
|
|
},
|
|
description: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "描述",
|
|
primaryKey: false,
|
|
field: "description",
|
|
autoIncrement: false
|
|
},
|
|
parent: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "父级目录",
|
|
primaryKey: false,
|
|
field: "parent",
|
|
autoIncrement: false
|
|
},
|
|
orgId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: false,
|
|
field: "orgId",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "t_resource_catalog",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
dc.models.ResourceCatalog = ResourceCatalog;
|
|
return ResourceCatalog;
|
|
};
|