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.
106 lines
2.5 KiB
106 lines
2.5 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const SchemeList = sequelize.define("schemeList", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
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
|
|
},
|
|
userText: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "用户输入文本",
|
|
primaryKey: false,
|
|
field: "user_text",
|
|
autoIncrement: false
|
|
},
|
|
tableData: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "表格数据",
|
|
primaryKey: false,
|
|
field: "table_data",
|
|
autoIncrement: false
|
|
},
|
|
status: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: "pending",
|
|
comment: "状态 success:成功 fail:失败 pending:待处理",
|
|
primaryKey: false,
|
|
field: "status",
|
|
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
|
|
},
|
|
structureType: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: "桥梁",
|
|
comment: "结构物类型",
|
|
primaryKey: false,
|
|
field: "structure_type",
|
|
autoIncrement: false
|
|
},
|
|
transmitMethod: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "传输方式",
|
|
primaryKey: false,
|
|
field: "transmit_method",
|
|
autoIncrement: false
|
|
},
|
|
}, {
|
|
tableName: "scheme_list",
|
|
comment: "方案清单表",
|
|
indexes: []
|
|
});
|
|
dc.models.SchemeList = SchemeList;
|
|
return SchemeList;
|
|
};
|