-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
138 lines (121 loc) · 3.08 KB
/
types.go
File metadata and controls
138 lines (121 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package database
const (
ScouterRole = iota
ViewerRole = iota
SupervisorRole = iota
ManagerRole = iota
AdminRole = iota
)
type User struct {
ID int `json:"id"`
Name string `json:"name"`
hashedPassword []byte
ScreenName string
Role int
}
type Team struct {
TeamNumber int `json:"number"`
Name string `json:"name"`
}
type Game struct {
ID int `json:"id"`
GameType string `json:"game_type"`
Red1 Team `json:"red_1"`
Red2 Team `json:"red_2"`
Blue1 Team `json:"blue_1"`
Blue2 Team `json:"blue_2"`
ScouterRed1 User `json:"scouter_red_1"`
ScouterRed2 User `json:"scouter_red_2"`
ScouterBlue1 User `json:"scouter_blue_1"`
ScouterBlue2 User `json:"scouter_blue_2"`
}
type FormAnswer struct {
ID int `json:"id"`
Scouter User `json:"scouter"`
Team Team `json:"team"`
Game Game `json:"game"`
Alliance string `json:"alliance"`
Location string `json:"location"`
// Auto
TeamElement string `json:"team_element"`
AutoDuck string `json:"auto_duck"`
AutoStorage int `json:"auto_storage"`
AutoShipping int `json:"auto_shipping"`
CubeLevel int `json:"cube_level"`
Parking string `json:"parking"`
// Teleop
Storage int `json:"storage"`
ShippingLow int `json:"shipping_low"`
ShippingMid int `json:"shipping_mid"`
ShippingHigh int `json:"shipping_high"`
Shared int `json:"shared"`
TeleopDucks int `json:"teleop_ducks"`
Capping string `json:"capping"`
Worked string `json:"worked"`
Notes string `json:"notes"`
}
type FormAnswerResponse struct {
// Auto
Location string
TeamElement string
AutoDuck string
AutoStorage int
AutoShipping int
CubeLevel int
Parking string
// Teleop
Storage int
ShippingLow int
ShippingMid int
ShippingHigh int
Shared int
TeleopDucks int
Capping string
Worked string
Notes string
}
type FieldFormAnswer struct {
ID int
Scouter User
Team Team
Cooperation int
Communication int
Kindness int
Suitability int
Notes int
}
type TeamScore struct {
TotalScore int
GamesPlayed int
Worked int
Notes []string
AutoTotalScore int
AutoStartedNear int // Amount of times robot started near the audience
TotalDucksCountAuto int // Amount of ducks placed when the robot started near the audience
TotalTowerScoreAuto int // The sum of points scored on the tower during the autonomous stage when the robot started near the audience
TotalTowerScore int
TotalSharedScore int
TotalDucksCount int
TotalShippingElementsPlaced int
}
type SupervisorForm struct {
ID int
Scouter User
Game Game
NearRedInterference bool
NearBlueInterference bool
Red1Penalty string
Red1Notes string
Red2Penalty string
Red2Notes string
Blue1Penalty string
Blue1Notes string
Blue2Penalty string
Blue2Notes string
}
type TeamSupervisorForm struct {
ID int
Interference bool
Penalty string
Notes string
}