将所有Regional更改为Area
This commit is contained in:
@@ -11,11 +11,11 @@ func NewListSensorDataResponse(data []models.SensorData, total int64, page, page
|
||||
dtos := make([]SensorDataDTO, len(data))
|
||||
for i, item := range data {
|
||||
dtos[i] = SensorDataDTO{
|
||||
Time: item.Time,
|
||||
DeviceID: item.DeviceID,
|
||||
RegionalControllerID: item.RegionalControllerID,
|
||||
SensorType: item.SensorType,
|
||||
Data: json.RawMessage(item.Data),
|
||||
Time: item.Time,
|
||||
DeviceID: item.DeviceID,
|
||||
AreaControllerID: item.AreaControllerID,
|
||||
SensorType: item.SensorType,
|
||||
Data: json.RawMessage(item.Data),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ type ListSensorDataRequest struct {
|
||||
|
||||
// SensorDataDTO 是用于API响应的传感器数据结构
|
||||
type SensorDataDTO struct {
|
||||
Time time.Time `json:"time"`
|
||||
DeviceID uint `json:"device_id"`
|
||||
RegionalControllerID uint `json:"regional_controller_id"`
|
||||
SensorType models.SensorType `json:"sensor_type"`
|
||||
Data json.RawMessage `json:"data"`
|
||||
Time time.Time `json:"time"`
|
||||
DeviceID uint `json:"device_id"`
|
||||
AreaControllerID uint `json:"area_controller_id"`
|
||||
SensorType models.SensorType `json:"sensor_type"`
|
||||
Data json.RawMessage `json:"data"`
|
||||
}
|
||||
|
||||
// ListSensorDataResponse 是获取传感器数据列表的响应结构
|
||||
|
||||
Reference in New Issue
Block a user