Archived
1

User addition to squads

Closes #8
This commit is contained in:
2017-11-24 00:16:22 +04:00
parent ef9ba0310c
commit a32ed89be8
17 changed files with 582 additions and 83 deletions

View File

@@ -16,3 +16,11 @@ type Player struct {
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
// PlayerProfile is a struch which handles all user information
type PlayerProfile struct {
Player Player
Profile Profile
League League
HaveProfile bool
}

View File

@@ -12,13 +12,15 @@ type SquadPlayer struct {
ID int `db:"id"`
SquadID int `db:"squad_id"`
PlayerID int `db:"player_id"`
UserType string `db:"user_type"`
AuthorID int `db:"author_id"`
CreatedAt time.Time `db:"created_at"`
}
// SquadPlayerFull is a struct, which handles all related information
type SquadPlayerFull struct {
Squad Squad
Player Player
Profile Profile
Squad SquadChat
Player Player
Profile Profile
UserRole string
}