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

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

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

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

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