|
|
|
/* eslint-disable*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = dc => {
|
|
|
|
const DataTypes = dc.ORM;
|
|
|
|
const sequelize = dc.orm;
|
|
|
|
const Report = sequelize.define("report", {
|
|
|
|
id: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: true,
|
|
|
|
field: "id",
|
|
|
|
autoIncrement: true,
|
|
|
|
unique: "report_id_uindex"
|
|
|
|
},
|
|
|
|
reportType: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "上报类型 巡查:patrol / 养护:conserve",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "report_type",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
projectType: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "工程类型 道路:road / 桥梁:birdge / 涵洞:culvert",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "project_type",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
road: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadSectionStart: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_section_start",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadSectionEnd: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_section_end",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
longitude: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "longitude",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
latitude: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "latitude",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
content: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "content",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
scenePic: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "scene_pic",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
conserveBeforePic: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "conserve_before_pic",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
conserveUnderwayPic: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "conserve_underway_pic",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
conserveAfterPic: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "conserve_after_pic",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
userId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "user_id",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
time: {
|
|
|
|
type: DataTypes.DATE,
|
|
|
|
allowNull: false,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "time",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
address: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "address",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
projectName: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "project_name",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
handleState: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "handle_state",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
performerId: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "执行者",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "performer_id",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
handleContent: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "执行内容描述",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "handle_content",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
handlePic: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "handle_pic",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
codeRoad: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "code_road",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
videoUrl: {
|
|
|
|
type: DataTypes.ARRAY(DataTypes.STRING),
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: null,
|
|
|
|
primaryKey: false,
|
|
|
|
field: "video_url",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadType: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "路面类型",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_type",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadWidth: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "路面宽度",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_width",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
wrongLane: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "错车道",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "wrong_lane",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadsideTrees: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "行道树",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "roadside_trees",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadsideDitch: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "边沟",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "roadside_ditch",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
guardrail: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "护栏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "guardrail",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadMarking: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "标线",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_marking",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
maintenanceStaffCount: {
|
|
|
|
type: DataTypes.INTEGER,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "养护人员人数",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "maintenance_staff_count",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
shoulderRepair: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "修整路肩",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "shoulder_repair",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
ditchCleaning: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "清理边沟",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "ditch_cleaning",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
asphaltRepair: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "修补沥青路面",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "asphalt_repair",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
concreteRepair: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "修补水泥路面",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "concrete_repair",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
grassMowing: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "除草",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "grass_mowing",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
treeWhitening: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "树刷白",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "tree_whitening",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
pileWhitening: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "桩刷白",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "pile_whitening",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
guardrailMaintenance: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "维护护栏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "guardrail_maintenance",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
endHeadRepair: {
|
|
|
|
type: DataTypes.DOUBLE,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "修复端头",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "end_head_repair",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
inspectionNoException: {
|
|
|
|
type: DataTypes.BOOLEAN,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "巡查无异常",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "inspection_no_exception",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
roadDamage: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "路面损坏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "road_damage",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
securityDamage: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "安防损坏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "security_damage",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
bridgeDamage: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "桥梁损坏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "bridge_damage",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
culvertDamage: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "涵洞损坏",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "culvert_damage",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
securityDeficiency: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "安防缺失",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "security_deficiency",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
encounteredEnvironment: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "路遇环境",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "encountered_environment",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
otherDescription: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "其他描述",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "other_description",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
handleOpinions: {
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: "处理意见",
|
|
|
|
primaryKey: false,
|
|
|
|
field: "handle_opinions",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
handleAdvice: {
|
|
|
|
index: 6,
|
|
|
|
type: DataTypes.STRING,
|
|
|
|
allowNull: true,
|
|
|
|
defaultValue: null,
|
|
|
|
comment: '管理员处理意见',
|
|
|
|
primaryKey: false,
|
|
|
|
field: "handle_advice",
|
|
|
|
autoIncrement: false
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
tableName: "report",
|
|
|
|
comment: "",
|
|
|
|
indexes: []
|
|
|
|
});
|
|
|
|
dc.models.Report = Report;
|
|
|
|
return Report;
|
|
|
|
};
|