数据 输入输出 处理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
1.1 KiB

package models
import (
"time"
)
type IotaData struct {
UserId string `json:"userId"`
ThingId string `json:"thingId"`
DimensionId string `json:"dimensionId"`
DimCapId string `json:"dimCapId"`
CapId string `json:"capId"`
DeviceId string `json:"deviceId"`
ScheduleId string `json:"scheduleId"`
TaskId string `json:"taskId"`
JobId int `json:"jobId"`
JobRepeatId int `json:"jobRepeatId"`
TriggerTime time.Time `json:"triggerTime"`
RealTime time.Time `json:"realTime"`
FinishTime time.Time `json:"finishTime"`
Seq int `json:"seq"`
Released bool `json:"released"`
Data Data `json:"data"`
}
type Data struct {
Type int `json:"type"`
Data map[string]any `json:"data"`
Result struct {
Code int `json:"code"`
Msg string `json:"msg"`
Detail string `json:"detail"`
ErrTimes int `json:"errTimes"`
Dropped bool `json:"dropped"`
} `json:"result"`
}
func (the *Data) Success() bool {
return the.Result.Code == 0
}