dashboard.go 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package model
  2. import "time"
  3. // MachineLifeCycle Machine Life Cycle.
  4. type MachineLifeCycle struct {
  5. Duration string `json:"duration_day"`
  6. Count int `json:"count"`
  7. }
  8. // MachineCountGroupByBusiness Machine Count Group By App.
  9. type MachineCountGroupByBusiness struct {
  10. BusinessUnit string
  11. Count int
  12. }
  13. // MachineCountGroupResponse Machine Count Group Response.
  14. type MachineCountGroupResponse struct {
  15. BusinessUnits []string `json:"departmentList"`
  16. Items []*MachineCountGroupItem `json:"items"`
  17. }
  18. // MachineCountGroupItem Machine Count Group Item.
  19. type MachineCountGroupItem struct {
  20. Type string `json:"type"`
  21. Data []int `json:"data"`
  22. }
  23. // MachineCreatedAndEndTime Machine Created And End Time.
  24. type MachineCreatedAndEndTime struct {
  25. ID int64 `json:"id"`
  26. MachineName string `json:"machine_name"`
  27. App string `json:"app"`
  28. Username string `json:"username"`
  29. CreateTime string `json:"created_time"`
  30. EndTime string `json:"end_time"`
  31. }
  32. // MachineUsage Machine Usage.
  33. type MachineUsage struct {
  34. ID int64 `json:"id"`
  35. MachineName string `json:"machine_name"`
  36. App string `json:"app"`
  37. Username string `json:"username"`
  38. CPURequest int `json:"cpu_request"`
  39. MemoryRequest int `json:"memory_request"`
  40. }
  41. // MobileMachineUserUsageCount Mobile Machine user Usage Count.
  42. type MobileMachineUserUsageCount struct {
  43. Username string `json:"username"`
  44. Count int `json:"count"`
  45. }
  46. // MobileMachineUsageCount Mobile Machine Usage Count.
  47. type MobileMachineUsageCount struct {
  48. MobileMachineID string `json:"mobile_machine_id"`
  49. MobileMachineName string `json:"mobile_machine_name"`
  50. Count int `json:"count"`
  51. }
  52. // MobileMachineTypeCount Mobile Machine Type Count.
  53. type MobileMachineTypeCount struct {
  54. ModeName string `json:"mode_name"`
  55. Count int `json:"count"`
  56. }
  57. // MobileMachineUsageTime Mobile Machine Usage Time.
  58. type MobileMachineUsageTime struct {
  59. //MobileMachineID int64 `json:"mobile_machine_id"`
  60. //MobileMachineName string `json:"mobile_machine_name"`
  61. //ModeName string `json:"mode_name"`
  62. Username string `json:"username"`
  63. StartTime time.Time `json:"start_time"`
  64. EndTime time.Time `json:"end_time"`
  65. Duration float64 `json:"duration_minutes"`
  66. }
  67. // MobileMachineUsageTimeResponse Mobile Machine Usage Time Response.
  68. type MobileMachineUsageTimeResponse struct {
  69. MobileMachineID int64 `json:"mobile_machine_id"`
  70. MobileMachineName string `json:"mobile_machine_name"`
  71. ModeName string `json:"mode_name"`
  72. TotalDuration float64 `json:"total_duration_minutes"`
  73. MobileMachinesUsageTime []*MobileMachineUsageTime `json:"machine_usage_record"`
  74. }