peer.go 923 B

1234567891011121314151617181920212223
  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" gorm:""`
  14. LastOnlineTime int64 `json:"last_online_time" gorm:"default:0;not null;"`
  15. TimeModel
  16. }
  17. type PeerList struct {
  18. Peers []*Peer `json:"list"`
  19. Pagination
  20. }