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.
66 lines
1.7 KiB
66 lines
1.7 KiB
'use strict';
|
|
|
|
/**
|
|
* FastGPT查询项目模型
|
|
*/
|
|
module.exports = (dc) => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const FastgptQueryItem = sequelize.define('fastgpt_query_item', {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
allowNull: false,
|
|
comment: "ID",
|
|
field: "id",
|
|
defaultValue: null
|
|
},
|
|
chat_id: {
|
|
type: DataTypes.STRING(256),
|
|
allowNull: false,
|
|
autoIncrement: false,
|
|
comment: "聊天ID",
|
|
field: "chat_id",
|
|
defaultValue: null
|
|
},
|
|
app_id: {
|
|
type: DataTypes.STRING(256),
|
|
allowNull: false,
|
|
autoIncrement: false,
|
|
comment: "应用ID",
|
|
field: "app_id",
|
|
defaultValue: null
|
|
},
|
|
title: {
|
|
type: DataTypes.STRING(256),
|
|
allowNull: true,
|
|
autoIncrement: false,
|
|
comment: "标题",
|
|
field: "title",
|
|
defaultValue: null
|
|
},
|
|
time: {
|
|
type: DataTypes.DATE,
|
|
allowNull: false,
|
|
autoIncrement: false,
|
|
comment: "时间",
|
|
field: "time",
|
|
defaultValue: null
|
|
},
|
|
delete: {
|
|
type: DataTypes.BOOLEAN,
|
|
allowNull: false,
|
|
autoIncrement: false,
|
|
comment: "是否删除",
|
|
field: "delete",
|
|
defaultValue: false
|
|
}
|
|
}, {
|
|
tableName: 'fastgpt_query_item',
|
|
timestamps: false,
|
|
underscored: true
|
|
});
|
|
dc.models.FastgptQueryItem = FastgptQueryItem;
|
|
return FastgptQueryItem;
|
|
};
|