12345678910111213141516171819202122232425262728293031323334353637 |
- package devicesrv
- import (
- "Cold_Logistic/internal/server/infra/models"
- validation "github.com/go-ozzo/ozzo-validation/v4"
- "gogs.baozhida.cn/Cold_Logistic_libs/pkg/contrib/core"
- )
- type DeviceSensorListReqVO struct {
- SnCode string `json:"snCode"`
- }
- func (r *DeviceSensorListReqVO) Validate() error {
- return validation.ValidateStruct(r, validation.Field(&r.SnCode, validation.Required))
- }
- type DeviceSensorListRespVO struct {
- SnCode string `json:"snCode"`
- SnIds interface{} `json:"snIds"`
- }
- type SnDataListReqVO struct {
- UserTokey string `json:"userTokey"`
- SnId string `json:"snId"`
- Page core.Page `json:"page"`
- Search struct {
- TimeStart models.MyTime `json:"timeStart"` // 2023-03-14 00:00:00
- TimeEnd models.MyTime `json:"timeEnd"`
- }
- }
- func (r *SnDataListReqVO) Validate() error {
- return validation.ValidateStruct(r,
- validation.Field(&r.SnId, validation.Required),
- validation.Field(&r.UserTokey, validation.Required),
- )
- }
|