diff --git a/api/app/lib/models/report.js b/api/app/lib/models/report.js index 71dafb37..cc5eacb2 100644 --- a/api/app/lib/models/report.js +++ b/api/app/lib/models/report.js @@ -205,7 +205,7 @@ module.exports = dc => { field: "performer_id", autoIncrement: false }, - handleContent: { + handleContent: { type: DataTypes.STRING, allowNull: true, defaultValue: null, @@ -232,6 +232,231 @@ module.exports = dc => { 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 + } }, { tableName: "report", comment: "", diff --git a/api/sequelize-automate.config.js b/api/sequelize-automate.config.js index 4081a021..273c6568 100644 --- a/api/sequelize-automate.config.js +++ b/api/sequelize-automate.config.js @@ -35,7 +35,7 @@ module.exports = { dir: './app/lib/models', // 指定输出 models 文件的目录 typesDir: 'models', // 指定输出 TypeScript 类型定义的文件目录,只有 TypeScript / Midway 等会有类型定义 emptyDir: false, // !!! 谨慎操作 生成 models 之前是否清空 `dir` 以及 `typesDir` - tables: ['report_spot_check'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 + tables: ['reportxxx'], // 指定生成哪些表的 models,如 ['user', 'user_post'];如果为 null,则忽略改属性 skipTables: [], // 指定跳过哪些表的 models,如 ['user'];如果为 null,则忽略改属性 tsNoCheck: false, // 是否添加 `@ts-nocheck` 注释到 models 文件中 ignorePrefix: [], // 生成的模型名称忽略的前缀,因为 项目中有以下表名是以 t_ 开头的,在实际模型中不需要, 可以添加多个 [ 't_data_', 't_',] ,长度较长的 前缀放前面