政务数据资源中心(Government data Resource center) 03专项3期主要建设内容
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.

62 lines
1.8 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const StandardDocFolder = sequelize.define("standardDocFolder", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "唯一标识",
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "t_standard_doc_folder_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: "文件夹名称",
primaryKey: false,
field: "name",
autoIncrement: false,
},
createAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: "文件夹创建时间",
primaryKey: false,
field: "create_at",
autoIncrement: false,
},
parent: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "父级文件夹",
primaryKey: false,
field: "parent",
autoIncrement: false,
references: {
key: "id",
model: "tStandardDocFolder"
}
}
}, {
tableName: "t_standard_doc_folder",
comment: "",
indexes: []
});
dc.models.StandardDocFolder = StandardDocFolder;
// const { MetadataDatabase } = dc.models;
// StandardDocFolder.belongsTo(StandardDocFolder, { foreignKey: 'parent', targetKey: 'id' });
// MetadataDatabase.hasMany(TagDatabase, { foreignKey: 'database', sourceKey: 'id' });
return StandardDocFolder;
};