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.
205 lines
4.9 KiB
205 lines
4.9 KiB
/* eslint-disable*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const SchemeListV2 = sequelize.define("schemeListV2", {
|
|
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
|
|
},
|
|
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
|
|
},
|
|
region: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "所在地区",
|
|
primaryKey: false,
|
|
field: "region",
|
|
autoIncrement: false
|
|
},
|
|
extraInfo: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "补充信息",
|
|
primaryKey: false,
|
|
field: "extra_info",
|
|
autoIncrement: false
|
|
},
|
|
layoutImgUrls: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "测点总体布置图URL",
|
|
primaryKey: false,
|
|
field: "layout_img_urls",
|
|
autoIncrement: false
|
|
},
|
|
statsImgUrls: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "测点统计表URL",
|
|
primaryKey: false,
|
|
field: "stats_img_urls",
|
|
autoIncrement: false
|
|
},
|
|
specImgUrls: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "传感器技术指标URL",
|
|
primaryKey: false,
|
|
field: "spec_img_urls",
|
|
autoIncrement: false
|
|
},
|
|
analysisItems: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "识别的监测因素与设备",
|
|
primaryKey: false,
|
|
field: "analysis_items",
|
|
autoIncrement: false
|
|
},
|
|
analysisSpecs: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "识别的技术指标",
|
|
primaryKey: false,
|
|
field: "analysis_specs",
|
|
autoIncrement: false
|
|
},
|
|
tableData: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "表格数据",
|
|
primaryKey: false,
|
|
field: "table_data",
|
|
autoIncrement: false
|
|
},
|
|
solarRows: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "太阳能计算表",
|
|
primaryKey: false,
|
|
field: "solar_rows",
|
|
autoIncrement: false
|
|
},
|
|
solarPowerRows: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "太阳能功率统计表",
|
|
primaryKey: false,
|
|
field: "solar_power_rows",
|
|
autoIncrement: false
|
|
},
|
|
durationRows: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "工期核算清单",
|
|
primaryKey: false,
|
|
field: "duration_rows",
|
|
autoIncrement: false
|
|
},
|
|
checkRows: {
|
|
type: DataTypes.JSONB,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "核算要点",
|
|
primaryKey: false,
|
|
field: "check_rows",
|
|
autoIncrement: false
|
|
},
|
|
status: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: "pending",
|
|
comment: "状态 success:成功 fail:失败 pending:待处理",
|
|
primaryKey: false,
|
|
field: "status",
|
|
autoIncrement: false
|
|
},
|
|
errorMessage: {
|
|
type: DataTypes.TEXT,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "失败原因",
|
|
primaryKey: false,
|
|
field: "error_message",
|
|
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: "scheme_list_v2",
|
|
comment: "方案清单表V2",
|
|
indexes: []
|
|
});
|
|
dc.models.SchemeListV2 = SchemeListV2;
|
|
return SchemeListV2;
|
|
};
|
|
|