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.
96 lines
2.1 KiB
96 lines
2.1 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const TenderDirectory = sequelize.define("tenderDirectory", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "目录ID",
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true
|
|
},
|
|
tenderId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "关联标书ID",
|
|
primaryKey: false,
|
|
field: "tender_id",
|
|
autoIncrement: false,
|
|
references: {
|
|
key: "id",
|
|
model: "tender"
|
|
}
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "目录名称",
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false
|
|
},
|
|
parentId: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "父目录ID",
|
|
primaryKey: false,
|
|
field: "parent_id",
|
|
autoIncrement: false,
|
|
references: {
|
|
key: "id",
|
|
model: "tenderDirectory"
|
|
}
|
|
},
|
|
order: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "目录顺序",
|
|
primaryKey: false,
|
|
field: "order",
|
|
autoIncrement: false,
|
|
},
|
|
content: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "章节内容",
|
|
primaryKey: false,
|
|
field: "content",
|
|
autoIncrement: false
|
|
},
|
|
chapterRequirements: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "章节需求",
|
|
primaryKey: false,
|
|
field: "chapter_requirements",
|
|
autoIncrement: false
|
|
},
|
|
chapterWords: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "章节字数",
|
|
primaryKey: false,
|
|
field: "chapter_words",
|
|
autoIncrement: false
|
|
}
|
|
}, {
|
|
tableName: "tender_directory",
|
|
comment: "标书目录",
|
|
indexes: []
|
|
});
|
|
dc.models.TenderDirectory = TenderDirectory;
|
|
return TenderDirectory;
|
|
};
|