peer.go 1.0 KB

12345678910111213141516171819202122232425
  1. package model
  2. type Peer struct {
  3. RowId uint `json:"row_id" gorm:"primaryKey;"`
  4. Id string `json:"id" gorm:"default:'';not null;index"`
  5. Cpu string `json:"cpu" gorm:"default:'';not null;"`
  6. Hostname string `json:"hostname" gorm:"default:'';not null;"`
  7. Memory string `json:"memory" gorm:"default:'';not null;"`
  8. Os string `json:"os" gorm:"default:'';not null;"`
  9. Username string `json:"username" gorm:"default:'';not null;"`
  10. Uuid string `json:"uuid" gorm:"default:'';not null;index"`
  11. Version string `json:"version" gorm:"default:'';not null;"`
  12. UserId uint `json:"user_id" gorm:"default:0;not null;index"`
  13. User *User `json:"user,omitempty"`
  14. LastOnlineTime int64 `json:"last_online_time" gorm:"default:0;not null;"`
  15. LastOnlineIp string `json:"last_online_ip" gorm:"default:'';not null;"`
  16. GroupId uint `json:"group_id" gorm:"default:0;not null;index"`
  17. TimeModel
  18. }
  19. type PeerList struct {
  20. Peers []*Peer `json:"list"`
  21. Pagination
  22. }