/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const StandardDoc = sequelize.define("standardDoc", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "唯一标识", primaryKey: true, field: "id", autoIncrement: true, unique: "t_standard_doc__id_uindex" }, docName: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "文档名称", primaryKey: false, field: "doc_name", autoIncrement: false, }, standardType: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "标准类型", primaryKey: false, field: "standard_type", autoIncrement: false, }, tags: { type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "标签", primaryKey: false, field: "tags", autoIncrement: false, }, folder: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "归属的文件夹", primaryKey: false, field: "folder", autoIncrement: false, references: { key: "id", model: "tStandardDocFolder" } }, path: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "文档存储路径", primaryKey: false, field: "path", autoIncrement: false, }, createAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, comment: "文件夹创建时间", primaryKey: false, field: "create_at", autoIncrement: false, }, }, { tableName: "t_standard_doc", comment: "", indexes: [] }); dc.models.StandardDoc = StandardDoc; // const { StandardDocFolder } = dc.models; // StandardDoc.belongsTo(StandardDocFolder, { foreignKey: 'folder', targetKey: 'id' }); // MetadataDatabase.hasMany(TagDatabase, { foreignKey: 'database', sourceKey: 'id' }); return StandardDoc; };