ai-query对接新版freesun-agent接口的分支
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.
 
 
 

87 lines
2.0 KiB

/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const SolutionChapterVersions = sequelize.define("solutionChapterVersions", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "ID(自增)",
primaryKey: true,
field: "id",
autoIncrement: true
},
solutionId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "关联方案ID",
primaryKey: false,
field: "solution_id",
autoIncrement: false,
references: {
key: "id",
model: "solutions"
}
},
chapterId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "关联章节ID",
primaryKey: false,
field: "chapter_id",
autoIncrement: false,
references: {
key: "id",
model: "solutionChapters"
}
},
version: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "版本号",
primaryKey: false,
field: "version",
autoIncrement: false
},
isCurrent: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: null,
comment: "是否当前版本",
primaryKey: false,
field: "is_current",
autoIncrement: false
},
content: {
type: DataTypes.TEXT,
allowNull: false,
defaultValue: null,
comment: "内容",
primaryKey: false,
field: "content",
autoIncrement: false
},
createAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
comment: "创建时间",
primaryKey: false,
field: "create_at",
autoIncrement: false
}
}, {
tableName: "solution_chapter_versions",
comment: "方案章节版本表",
indexes: []
});
dc.models.SolutionChapterVersions = SolutionChapterVersions;
return SolutionChapterVersions;
};