aboutsummaryrefslogtreecommitdiff
path: root/backend/models/models.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-01-06 23:55:12 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-01-06 23:55:12 +0300
commit4820c7696db3c54959258b1a5b00c77e1246cbd7 (patch)
tree179edfca03618395939df1c3afccf2c90c64d424 /backend/models/models.go
parent(#20) successful integration of demo upload to drive (diff)
downloadlphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.tar.gz
lphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.tar.bz2
lphub-4820c7696db3c54959258b1a5b00c77e1246cbd7.zip
what the fuck is this mess (#21)
Diffstat (limited to 'backend/models/models.go')
-rw-r--r--backend/models/models.go25
1 files changed, 6 insertions, 19 deletions
diff --git a/backend/models/models.go b/backend/models/models.go
index 2be8765..c49eaeb 100644
--- a/backend/models/models.go
+++ b/backend/models/models.go
@@ -3,23 +3,10 @@ package models
3import "time" 3import "time"
4 4
5type User struct { 5type User struct {
6 SteamID string 6 SteamID string `json:"steam_id"`
7 Username string 7 Username string `json:"username"`
8 AvatarLink string 8 AvatarLink string `json:"avatar_link"`
9 CountryCode string 9 CountryCode string `json:"country_code"`
10 CreatedAt time.Time 10 CreatedAt time.Time `json:"created_at"`
11 UpdatedAt time.Time 11 UpdatedAt time.Time `json:"updated_at"`
12 UserType int16
13}
14
15func (user *User) TypeToString() []string {
16 var list []string
17 switch user.UserType {
18 case 0:
19 list = append(list, "Normal")
20 }
21 if len(list) == 0 {
22 list = append(list, "Unknown")
23 }
24 return list
25} 12}