peer.go 991 B

123456789101112131415161718192021222324
  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. TimeModel
  17. }
  18. type PeerList struct {
  19. Peers []*Peer `json:"list"`
  20. Pagination
  21. }