Add basic web app and API integration
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package main
|
||||
|
||||
type User struct {
|
||||
ID int64 `json:"id"`
|
||||
Username string `json:"username"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Language string `json:"language"`
|
||||
IsSystemAdmin bool `json:"is_system_admin"`
|
||||
}
|
||||
|
||||
type Competition struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
AllowAnyScorerEdit bool `json:"allow_any_scorer_edit"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
Role string `json:"role,omitempty"`
|
||||
}
|
||||
|
||||
type CompetitionUser struct {
|
||||
UserID int64 `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
type Pilot struct {
|
||||
ID int64 `json:"id"`
|
||||
CompetitionID int64 `json:"competition_id"`
|
||||
Number string `json:"number"`
|
||||
LastName string `json:"last_name"`
|
||||
FirstName string `json:"first_name"`
|
||||
Country string `json:"country"`
|
||||
BalloonID string `json:"balloon_id"`
|
||||
}
|
||||
|
||||
type Penalty struct {
|
||||
ID int64 `json:"id"`
|
||||
CompetitionID int64 `json:"competition_id"`
|
||||
Flight string `json:"flight"`
|
||||
Date string `json:"date"`
|
||||
PilotNumber string `json:"pilot_number"`
|
||||
PilotName string `json:"pilot_name"`
|
||||
RuleNumber string `json:"rule_number"`
|
||||
Task string `json:"task"`
|
||||
PenaltiesText string `json:"penalties_text"`
|
||||
Description string `json:"description"`
|
||||
CreatedBy int64 `json:"created_by"`
|
||||
CreatedByName string `json:"created_by_name"`
|
||||
Transferred bool `json:"transferred"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type Rule struct {
|
||||
Number string `json:"number"`
|
||||
Text string `json:"text"`
|
||||
SuggestedPenalty string `json:"suggested_penalty"`
|
||||
EscalationMode string `json:"escalation_mode"`
|
||||
EscalationTiers []string `json:"escalation_tiers,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user