aboutsummaryrefslogtreecommitdiff
path: root/backend/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/models/models.go')
-rw-r--r--backend/models/models.go37
1 files changed, 19 insertions, 18 deletions
diff --git a/backend/models/models.go b/backend/models/models.go
index 49a4f82..5c9b8f8 100644
--- a/backend/models/models.go
+++ b/backend/models/models.go
@@ -23,7 +23,6 @@ type Map struct {
23 GameName string `json:"game_name"` 23 GameName string `json:"game_name"`
24 ChapterName string `json:"chapter_name"` 24 ChapterName string `json:"chapter_name"`
25 MapName string `json:"map_name"` 25 MapName string `json:"map_name"`
26 Data any `json:"data"`
27} 26}
28 27
29type MapShort struct { 28type MapShort struct {
@@ -32,23 +31,9 @@ type MapShort struct {
32} 31}
33 32
34type MapSummary struct { 33type MapSummary struct {
35 Description string `json:"description"` 34 Rating float32 `json:"rating"`
36 Showcase string `json:"showcase"` 35 History []MapHistory `json:"history"`
37 CategoryScores MapCategoryScores `json:"category_scores"` 36 Routes []MapRoute `json:"routes"`
38 Rating float32 `json:"rating"`
39 Routers []string `json:"routers"`
40 History []MapHistory `json:"history"`
41}
42
43type MapCategoryScores struct {
44 CM int `json:"cm"`
45 NoSLA int `json:"no_sla"`
46 InboundsSLA int `json:"inbounds_sla"`
47 Any int `json:"any"`
48}
49
50type MapRecords struct {
51 Records any `json:"records"`
52} 37}
53 38
54type MapHistory struct { 39type MapHistory struct {
@@ -57,6 +42,17 @@ type MapHistory struct {
57 Date time.Time `json:"date"` 42 Date time.Time `json:"date"`
58} 43}
59 44
45type MapRoute struct {
46 Category Category `json:"category"`
47 ScoreCount int `json:"score_count"`
48 Description string `json:"description"`
49 Showcase string `json:"showcase"`
50}
51
52type MapRecords struct {
53 Records any `json:"records"`
54}
55
60type UserRanking struct { 56type UserRanking struct {
61 UserID string `json:"user_id"` 57 UserID string `json:"user_id"`
62 UserName string `json:"user_name"` 58 UserName string `json:"user_name"`
@@ -73,6 +69,11 @@ type Chapter struct {
73 Name string `json:"name"` 69 Name string `json:"name"`
74} 70}
75 71
72type Category struct {
73 ID int `json:"id"`
74 Name string `json:"name"`
75}
76
76type RecordSP struct { 77type RecordSP struct {
77 RecordID int `json:"record_id"` 78 RecordID int `json:"record_id"`
78 Placement int `json:"placement"` 79 Placement int `json:"placement"`