/* eslint-disable*/ 'use strict'; module.exports = dc => { const DataTypes = dc.ORM; const sequelize = dc.orm; const Tender = sequelize.define("tender", { id: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, comment: "标书ID", primaryKey: true, field: "id", autoIncrement: true }, userId: { type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "创建标书的用户ID", primaryKey: false, field: "user_id", autoIncrement: false }, name: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "标书名称", primaryKey: false, field: "name", autoIncrement: false }, fileUrl: { type: DataTypes.STRING, allowNull: false, defaultValue: null, comment: "标书格式文件URL", primaryKey: false, field: "file_url", 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 }, status: { type: DataTypes.STRING, allowNull: false, defaultValue: 'success', comment: "状态 success:成功 fail:失败 pending:待处理", primaryKey: false, field: "status", autoIncrement: false }, onlyTechnicalPapers: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, comment: "是否只生成【技术文件】章节", primaryKey: false, field: "only_technical_papers", autoIncrement: false } }, { tableName: "tender", comment: "标书列表", indexes: [] }); dc.models.Tender = Tender; return Tender; };