/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const SolutionChapters = sequelize.define("solutionChapters", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "ID(自增)", primaryKey: true, field: "id", autoIncrement: true }, solutionId: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "关联方案ID", primaryKey: false, field: "solution_id", autoIncrement: false, references: { key: "id", model: "solutions" } }, title: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "标题", primaryKey: false, field: "title", autoIncrement: false }, targetWords: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "目标字数", primaryKey: false, field: "target_words", autoIncrement: false }, targetPages: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "目标页数", primaryKey: false, field: "target_pages", autoIncrement: false }, targetCharts: { type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "目标图表数量", primaryKey: false, field: "target_charts", autoIncrement: false }, targetTables: { type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "目标表格数量", primaryKey: false, field: "target_tables", autoIncrement: false }, requirements: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, comment: "编写要求", primaryKey: false, field: "requirements", autoIncrement: false }, targetSections: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "目标节数", primaryKey: false, field: "target_sections", autoIncrement: false }, targetSegments: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "目标段落数", primaryKey: false, field: "target_segments", autoIncrement: false }, targetSegmentsWords: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "目标每段字数", primaryKey: false, field: "target_segments_words", autoIncrement: false }, writingDirection: { type: DataTypes.TEXT, allowNull: true, defaultValue: null, comment: "写作方向", primaryKey: false, field: "writing_direction", autoIncrement: false }, parentId: { type: DataTypes.INTEGER, allowNull: true, defaultValue: null, comment: "父章节ID", primaryKey: false, field: "parent_id", autoIncrement: false }, sortOrder: { type: DataTypes.INTEGER, allowNull: false, defaultValue: "0", comment: "顺序", primaryKey: false, field: "sort_order", autoIncrement: false }, level: { type: DataTypes.INTEGER, allowNull: false, defaultValue: "0", comment: "层级", primaryKey: false, field: "level", 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: "solution_chapters", comment: "方案章节表", indexes: [] }); dc.models.SolutionChapters = SolutionChapters; return SolutionChapters; };