common.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package request
  2. // PageInfo Paging common input parameter structure
  3. type PageInfo struct {
  4. Page int `json:"page" form:"page"` // 页码
  5. PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
  6. Keyword string `json:"keyword" form:"keyword"` //关键字1
  7. Shunt string `json:"shunt" form:"shunt"` //关键字2
  8. }
  9. // GetById Find by id structure
  10. type GetById struct {
  11. ID int `json:"id" form:"id"` // 主键ID
  12. }
  13. type GetBySn struct {
  14. Sn string `json:"sn" form:"sn"` // sn
  15. }
  16. func (r *GetById) Uint() uint {
  17. return uint(r.ID)
  18. }
  19. type IdsReq struct {
  20. Ids []int `json:"ids" form:"ids"`
  21. }
  22. type DeviceStatus struct {
  23. Status int `json:"status"` //在线状态 1 在线 0 离线
  24. PlayStatus int `json:"playStatus"` // 播放状态 1 正常 0 异常
  25. DisplayStatus int `json:"displayStatus"` // 显示模板状态 1 正常 0 异常
  26. SourceStatus int `json:"sourceStatus"` // 素材状态 1 正常 0 异常
  27. }
  28. // GetAuthorityId Get role by id structure
  29. type GetAuthorityId struct {
  30. AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
  31. }
  32. type Empty struct{}