61 lines
1.5 KiB
Go
61 lines
1.5 KiB
Go
package quota
|
|
|
|
import (
|
|
"time"
|
|
|
|
commonDto "git.ilapage.cn/ila/yovision/Sense/server/common/dto"
|
|
)
|
|
|
|
const (
|
|
ReadStatusReadable = "readable"
|
|
ReadStatusUnreadable = "unreadable"
|
|
)
|
|
|
|
type PageRequest struct {
|
|
commonDto.Pagination `search:"-"`
|
|
Keyword string `form:"keyword"`
|
|
Status string `form:"status"`
|
|
}
|
|
|
|
type UpdateRequest struct {
|
|
Limit int `json:"limit"`
|
|
Reason string `json:"reason"`
|
|
Version int64 `json:"version"`
|
|
UpdateBy int `json:"-"`
|
|
}
|
|
|
|
type Summary struct {
|
|
Limit int `json:"limit"`
|
|
Used int `json:"used"`
|
|
Remaining int `json:"remaining"`
|
|
ReadStatus string `json:"readStatus"`
|
|
Source string `json:"source"`
|
|
Version int64 `json:"version"`
|
|
LastReadAt time.Time `json:"lastReadAt"`
|
|
LastChanged time.Time `json:"lastChangedAt,omitempty"`
|
|
}
|
|
|
|
type DeviceOccupancy struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Location string `json:"location"`
|
|
Status string `json:"status"`
|
|
Occupied bool `json:"occupied"`
|
|
Version int64 `json:"version"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
type Tier struct {
|
|
Limit int `json:"limit"`
|
|
Configured bool `json:"configured"`
|
|
Validation string `json:"validation"`
|
|
DeliveryStatus string `json:"deliveryStatus"`
|
|
}
|
|
|
|
type Overview struct {
|
|
Summary Summary `json:"summary"`
|
|
List []DeviceOccupancy `json:"list"`
|
|
Count int64 `json:"count"`
|
|
Tiers []Tier `json:"tiers"`
|
|
}
|