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.
41 lines
1.2 KiB
41 lines
1.2 KiB
package common_models
|
|
|
|
import "time"
|
|
|
|
type EsTheme struct {
|
|
SensorName string `json:"sensor_name"`
|
|
FactorName string `json:"factor_name"`
|
|
FactorProtoCode string `json:"factor_proto_code"`
|
|
Data map[string]any `json:"data"`
|
|
FactorProtoName string `json:"factor_proto_name"`
|
|
Factor int `json:"factor"`
|
|
CollectTime time.Time `json:"collect_time"`
|
|
Sensor int `json:"sensor"`
|
|
Structure int `json:"structure"`
|
|
IotaDevice []string `json:"iota_device"`
|
|
CreateTime time.Time `json:"create_time"`
|
|
}
|
|
|
|
type EsThemeResp struct {
|
|
Took int `json:"took"`
|
|
TimedOut bool `json:"timed_out"`
|
|
Shards struct {
|
|
Total int `json:"total"`
|
|
Successful int `json:"successful"`
|
|
Skipped int `json:"skipped"`
|
|
Failed int `json:"failed"`
|
|
} `json:"_shards"`
|
|
Hits struct {
|
|
Total int `json:"total"`
|
|
MaxScore float64 `json:"max_score"`
|
|
Hits []HitTheme `json:"hits"`
|
|
} `json:"hits"`
|
|
}
|
|
|
|
type HitTheme struct {
|
|
Index string `json:"_index"`
|
|
Type string `json:"_type"`
|
|
Id string `json:"_id"`
|
|
Score float64 `json:"_score"`
|
|
Source EsTheme `json:"_source"`
|
|
}
|
|
|