'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; };