Browse Source

告警数据查询

dev
CODE 1 year ago
parent
commit
f63477656a
  1. 76
      api/app/lib/models/alarm_service_type.js
  2. 164
      api/app/lib/models/equipment_maintenance_record.js
  3. 184
      api/app/lib/models/project_correlation.js

76
api/app/lib/models/alarm_service_type.js

@ -2,42 +2,42 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const AlarmServiceType = sequelize.define("alarmServiceType", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "alarm_service_type_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
typeNumber: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type_number",
autoIncrement: false
}
}, {
tableName: "alarm_service_type",
comment: "",
indexes: []
});
dc.models.AlarmServiceType = AlarmServiceType;
return AlarmServiceType;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const AlarmServiceType = sequelize.define("alarmServiceType", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "alarm_service_type_id_uindex"
},
name: {
type: DataTypes.STRING,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
typeNumber: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "type_number",
autoIncrement: false
}
}, {
tableName: "alarm_service_type",
comment: "",
indexes: []
});
dc.models.AlarmServiceType = AlarmServiceType;
return AlarmServiceType;
};

164
api/app/lib/models/equipment_maintenance_record.js

@ -3,86 +3,86 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const EquipmentMaintenanceRecord = sequelize.define("equipmentMaintenanceRecord", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true
},
equipmentType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "equipment_type",
autoIncrement: false
},
equipmentCategory: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "equipment_category",
autoIncrement: false
},
maintenanceReason: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "maintenance_reason",
autoIncrement: false
},
solution: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "solution",
autoIncrement: false
},
reportTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "report_time",
autoIncrement: false
},
completedTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "completed_time",
autoIncrement: false
},
status: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "status",
autoIncrement: false
}
}, {
tableName: "equipment_maintenance_record",
comment: "",
indexes: []
});
dc.models.EquipmentMaintenanceRecord = EquipmentMaintenanceRecord;
return EquipmentMaintenanceRecord;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const EquipmentMaintenanceRecord = sequelize.define("equipmentMaintenanceRecord", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true
},
equipmentType: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "equipment_type",
autoIncrement: false
},
equipmentCategory: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "equipment_category",
autoIncrement: false
},
maintenanceReason: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "maintenance_reason",
autoIncrement: false
},
solution: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "solution",
autoIncrement: false
},
reportTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "report_time",
autoIncrement: false
},
completedTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "completed_time",
autoIncrement: false
},
status: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "status",
autoIncrement: false
}
}, {
tableName: "equipment_maintenance_record",
comment: "",
indexes: []
});
dc.models.EquipmentMaintenanceRecord = EquipmentMaintenanceRecord;
return EquipmentMaintenanceRecord;
};

184
api/app/lib/models/project_correlation.js

@ -2,96 +2,96 @@
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ProjectCorrelation = sequelize.define("projectCorrelation", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "project_correlation_id_uindex"
},
anxinProjectId: {
type: DataTypes.ARRAY(DataTypes.INTEGER),
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "anxin_project_id",
autoIncrement: false
},
createTime: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "create_time",
autoIncrement: false
},
createUser: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "create_user",
autoIncrement: false
},
name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
pepProjectId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "pep_project_id",
autoIncrement: false
},
del: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "del",
autoIncrement: false
},
updateTime: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "update_time",
autoIncrement: false
},
mappingClass: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "mapping_class",
autoIncrement: false
},
}, {
tableName: "project_correlation",
comment: "",
indexes: []
});
dc.models.ProjectCorrelation = ProjectCorrelation;
return ProjectCorrelation;
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const ProjectCorrelation = sequelize.define("projectCorrelation", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: true,
field: "id",
autoIncrement: true,
unique: "project_correlation_id_uindex"
},
anxinProjectId: {
type: DataTypes.ARRAY(DataTypes.INTEGER),
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "anxin_project_id",
autoIncrement: false
},
createTime: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "create_time",
autoIncrement: false
},
createUser: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "create_user",
autoIncrement: false
},
name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "name",
autoIncrement: false
},
pepProjectId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "pep_project_id",
autoIncrement: false
},
del: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "del",
autoIncrement: false
},
updateTime: {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
comment: null,
primaryKey: false,
field: "update_time",
autoIncrement: false
},
mappingClass: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "mapping_class",
autoIncrement: false
},
}, {
tableName: "project_correlation",
comment: "",
indexes: []
});
dc.models.ProjectCorrelation = ProjectCorrelation;
return ProjectCorrelation;
};
Loading…
Cancel
Save