GetDeviceThresholdAlarm

GetAreaThresholdAlarm
This commit is contained in:
2025-11-10 17:50:05 +08:00
parent f2b0c2987f
commit f44a94b451
3 changed files with 101 additions and 5 deletions

View File

@@ -113,3 +113,23 @@ type UpdateAreaThresholdAlarmDTO struct {
Operator models.Operator `json:"operator" binding:"required"` // 新的操作符
Level models.SeverityLevel `json:"level,omitempty"` // 新的告警等级,可选
}
// AreaThresholdAlarmDTO 用于表示一个区域阈值告警任务的详细信息
type AreaThresholdAlarmDTO struct {
ID int `json:"id"`
AreaControllerID uint `json:"area_controller_id"`
SensorType models.SensorType `json:"sensor_type"`
Thresholds float64 `json:"thresholds"`
Operator models.Operator `json:"operator"`
Level models.SeverityLevel `json:"level"`
}
// DeviceThresholdAlarmDTO 用于表示一个设备阈值告警任务的详细信息
type DeviceThresholdAlarmDTO struct {
ID int `json:"id"`
DeviceID uint `json:"device_id"`
SensorType models.SensorType `json:"sensor_type"`
Thresholds float64 `json:"thresholds"`
Operator models.Operator `json:"operator"`
Level models.SeverityLevel `json:"level"`
}