group.go 503 B

123456789101112131415161718192021222324252627282930
  1. package model
  2. const (
  3. GroupTypeDefault = 1 // 默认
  4. GroupTypeShare = 2 // 共享
  5. )
  6. type Group struct {
  7. IdModel
  8. Name string `json:"name" gorm:"default:'';not null;"`
  9. Type int `json:"type" gorm:"default:1;not null;"`
  10. TimeModel
  11. }
  12. type GroupList struct {
  13. Groups []*Group `json:"list"`
  14. Pagination
  15. }
  16. type DeviceGroup struct {
  17. IdModel
  18. Name string `json:"name" gorm:"default:'';not null;"`
  19. TimeModel
  20. }
  21. type DeviceGroupList struct {
  22. DeviceGroups []*DeviceGroup `json:"list"`
  23. Pagination
  24. }