From d35a9a945ecaeeceb21bd91eeeaa4c6ec0a15e24 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Fri, 5 Jul 2024 21:03:46 +0300 Subject: feat: return portal count from games and chapter map select (#155) --- backend/models/models.go | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'backend/models/models.go') diff --git a/backend/models/models.go b/backend/models/models.go index b766b97..64d90d1 100644 --- a/backend/models/models.go +++ b/backend/models/models.go @@ -50,10 +50,12 @@ type Map struct { } type MapShort struct { - ID int `json:"id"` - Name string `json:"name"` - Image string `json:"image"` - IsDisabled bool `json:"is_disabled"` + ID int `json:"id"` + Name string `json:"name"` + Image string `json:"image"` + IsDisabled bool `json:"is_disabled"` + PortalCount int `json:"portal_count"` + Difficulty int `json:"difficulty"` } type MapSummary struct { @@ -87,10 +89,11 @@ type UserRanking struct { } type Game struct { - ID int `json:"id"` - Name string `json:"name"` - Image string `json:"image"` - IsCoop bool `json:"is_coop"` + ID int `json:"id"` + Name string `json:"name"` + Image string `json:"image"` + IsCoop bool `json:"is_coop"` + CategoryPortals []CategoryPortal `json:"category_portals"` } type Chapter struct { @@ -100,6 +103,11 @@ type Chapter struct { IsDisabled bool `json:"is_disabled"` } +type CategoryPortal struct { + Category Category `json:"category"` + PortalCount int `json:"portal_count"` +} + type Category struct { ID int `json:"id"` Name string `json:"name"` -- cgit v1.2.3