/* 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; };