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.
115 lines
2.6 KiB
115 lines
2.6 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Solutions = sequelize.define("solutions", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "ID(自增)",
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "名称",
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
industry: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "所属行业",
|
|
primaryKey: false,
|
|
field: "industry",
|
|
autoIncrement: false
|
|
},
|
|
messages: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "AI对话记录",
|
|
primaryKey: false,
|
|
field: "messages",
|
|
autoIncrement: false
|
|
},
|
|
projectInfo: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "项目信息",
|
|
primaryKey: false,
|
|
field: "project_info",
|
|
autoIncrement: false
|
|
},
|
|
requirements: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "整体编写要求(暗标)",
|
|
primaryKey: false,
|
|
field: "requirements",
|
|
autoIncrement: false
|
|
},
|
|
previewChapters: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "预览目录",
|
|
primaryKey: false,
|
|
field: "preview_chapters",
|
|
autoIncrement: false
|
|
},
|
|
status: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "状态",
|
|
primaryKey: false,
|
|
field: "status",
|
|
autoIncrement: false
|
|
},
|
|
creator: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "创建人",
|
|
primaryKey: false,
|
|
field: "creator",
|
|
autoIncrement: false
|
|
},
|
|
createAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
|
|
comment: "创建时间",
|
|
primaryKey: false,
|
|
field: "create_at",
|
|
autoIncrement: false
|
|
},
|
|
updateAt: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
|
|
comment: "更新时间",
|
|
primaryKey: false,
|
|
field: "update_at",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "solutions",
|
|
comment: "方案表",
|
|
indexes: []
|
|
});
|
|
dc.models.Solutions = Solutions;
|
|
return Solutions;
|
|
};
|