/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const BusinessRule = sequelize.define("businessRule", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "唯一标识", primaryKey: true, field: "id", autoIncrement: true, unique: "t_business_rule_id_uindex" }, name: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "业务规则名称", primaryKey: false, field: "name", autoIncrement: false, }, description: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "业务规则描述", primaryKey: false, field: "description", autoIncrement: false, }, problemType: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "标签", primaryKey: false, field: "problem_type", autoIncrement: false, }, ruleBasis: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "制定依据", primaryKey: false, field: "rule_basis", autoIncrement: false, references: { key: "id", model: "tStandardDoc" } }, problemLevel: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "问题级别", primaryKey: false, field: "problem_level", autoIncrement: false, }, createAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, comment: "创建时间", primaryKey: false, field: "create_at", autoIncrement: false, }, }, { tableName: "t_business_rule", comment: "", indexes: [] }); dc.models.BusinessRule = BusinessRule; // const { StandardDoc } = dc.models; // BusinessRule.belongsTo(StandardDoc, { foreignKey: 'ruleBasis', targetKey: 'id' }); // MetadataDatabase.hasMany(TagDatabase, { foreignKey: 'database', sourceKey: 'id' }); return BusinessRule; };