/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const ReportChapter = sequelize.define("reportChapter", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "Primary key", primaryKey: true, field: "id", autoIncrement: true }, instanceId: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "Instance id", primaryKey: false, field: "instance_id", autoIncrement: false, references: { key: "id", model: "reportInstance" } }, parentId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "Parent chapter id", primaryKey: false, field: "parent_id", autoIncrement: false, references: { key: "id", model: "reportChapter" } }, title: { type: DataTypes.TEXT, allowNull: false, defaultValue: null, comment: "Chapter title", primaryKey: false, field: "title", autoIncrement: false }, position: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "Chapter position", primaryKey: false, field: "position", autoIncrement: false }, prompts: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, comment: "AI prompts", primaryKey: false, field: "prompts", autoIncrement: false }, status: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, comment: "Chapter writing status", primaryKey: false, field: "status", autoIncrement: false }, createdAt: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), comment: "Created time", primaryKey: false, field: "created_at", autoIncrement: false } }, { tableName: "report_chapter", comment: "Report chapter table", indexes: [] }); dc.models.ReportChapter = ReportChapter; return ReportChapter; };