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.
54 lines
1.8 KiB
54 lines
1.8 KiB
package vo
|
|
|
|
import (
|
|
"laic-backend/common"
|
|
"laic-backend/model"
|
|
)
|
|
|
|
// DockPageReq 机巢分页查询
|
|
type DockPageReq struct {
|
|
common.Pagination
|
|
RegisterStatus string `json:"registerStatus" form:"registerStatus"`
|
|
Keyword string `json:"keyword" form:"keyword"` // 匹配 name / dockId / code
|
|
}
|
|
|
|
// DockCreateReq 手动登记机巢
|
|
type DockCreateReq struct {
|
|
DockID string `json:"dockId" validate:"required,max=64"`
|
|
Name string `json:"name" validate:"max=64"`
|
|
Code string `json:"code" validate:"max=32"`
|
|
SN string `json:"sn" validate:"max=64"`
|
|
Iccid string `json:"iccid" validate:"max=32"`
|
|
Location string `json:"location" validate:"max=128"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
Altitude float64 `json:"altitude"`
|
|
UserID int64 `json:"userId"` // 仅 admin 可指定归属用户,普通用户忽略
|
|
}
|
|
|
|
// DockUpdateReq 更新/认领机巢
|
|
type DockUpdateReq struct {
|
|
Name string `json:"name" validate:"max=64"`
|
|
Code string `json:"code" validate:"max=32"`
|
|
Location *string `json:"location" validate:"omitempty,max=128"`
|
|
Longitude *float64 `json:"longitude"`
|
|
Latitude *float64 `json:"latitude"`
|
|
Altitude *float64 `json:"altitude"`
|
|
Iccid string `json:"iccid" validate:"max=32"`
|
|
UserID int64 `json:"userId"` // 仅 admin 可改归属
|
|
RegisterAs string `json:"registerAs"` // 空则不修改;registered 表示完成登记
|
|
}
|
|
|
|
// DockVO 机巢详情(含实时状态)
|
|
type DockVO struct {
|
|
*model.Dock
|
|
Online bool `json:"online"`
|
|
Realtime map[string]string `json:"realtime"`
|
|
}
|
|
|
|
// DockStatusVO 机巢实时状态
|
|
type DockStatusVO struct {
|
|
DockID string `json:"dockId"`
|
|
Online bool `json:"online"`
|
|
Realtime map[string]string `json:"realtime"`
|
|
}
|
|
|