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.
 
 
 

45 lines
1.1 KiB

'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const QuotaChapterFirstFree = sequelize.define('quotaChapterFirstFree', {
userId: {
type: DataTypes.BIGINT,
allowNull: false,
primaryKey: true,
field: 'user_id',
comment: 'User id',
},
docId: {
type: DataTypes.BIGINT,
allowNull: false,
primaryKey: true,
field: 'doc_id',
comment: 'Document id',
},
chapterKey: {
type: DataTypes.STRING(128),
allowNull: false,
primaryKey: true,
field: 'chapter_key',
comment: 'Chapter key',
},
firstGeneratedAt: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: sequelize.literal('CURRENT_TIMESTAMP'),
field: 'first_generated_at',
comment: 'First generated time',
},
}, {
tableName: 'quota_chapter_first_free',
comment: 'Free first-generate mark for each chapter',
timestamps: false,
indexes: [],
});
dc.models.QuotaChapterFirstFree = QuotaChapterFirstFree;
return QuotaChapterFirstFree;
};