diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-01-12 11:49:23 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-01-12 11:49:23 +0300 |
| commit | 24f3c154665f777e985d29263ed99a7b968949cc (patch) | |
| tree | 2e8f8e29623c885d1068ec554afbf081057d4bc1 /backend/models | |
| parent | remove cutscene maps (#22) (diff) | |
| download | lphub-24f3c154665f777e985d29263ed99a7b968949cc.tar.gz lphub-24f3c154665f777e985d29263ed99a7b968949cc.tar.bz2 lphub-24f3c154665f777e985d29263ed99a7b968949cc.zip | |
demo to google drive is worknig properly (#20)
Diffstat (limited to 'backend/models')
| -rw-r--r-- | backend/models/models.go | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/backend/models/models.go b/backend/models/models.go index c49eaeb..994a1e7 100644 --- a/backend/models/models.go +++ b/backend/models/models.go | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | package models | 1 | package models |
| 2 | 2 | ||
| 3 | import "time" | 3 | import ( |
| 4 | "mime/multipart" | ||
| 5 | "time" | ||
| 6 | ) | ||
| 4 | 7 | ||
| 5 | type User struct { | 8 | type User struct { |
| 6 | SteamID string `json:"steam_id"` | 9 | SteamID string `json:"steam_id"` |
| @@ -10,3 +13,15 @@ type User struct { | |||
| 10 | CreatedAt time.Time `json:"created_at"` | 13 | CreatedAt time.Time `json:"created_at"` |
| 11 | UpdatedAt time.Time `json:"updated_at"` | 14 | UpdatedAt time.Time `json:"updated_at"` |
| 12 | } | 15 | } |
| 16 | |||
| 17 | type Record struct { | ||
| 18 | MapID int `json:"map_id" binding:"required"` | ||
| 19 | ScoreCount int `json:"score_count" binding:"required"` | ||
| 20 | ScoreTime int `json:"score_time" binding:"required"` | ||
| 21 | IsCoop bool `json:"is_coop" binding:"required"` | ||
| 22 | PartnerID string `json:"partner_id"` | ||
| 23 | } | ||
| 24 | |||
| 25 | type ds struct { | ||
| 26 | File *multipart.FileHeader `form:"file" binding:"required"` | ||
| 27 | } | ||