Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Match ¶
type Match struct { gorm.Model Tournament Tournament `gorm:"ForeignKey:TournamentID"` TournamentID uint Team1 Team `gorm:"ForeignKey:Team1ID"` Team1ID uint Team2 Team `gorm:"ForeignKey:Team2ID"` Team2ID uint Team1Score int `sql:"DEFAULT:-1"` Team2Score int `sql:"DEFAULT:-1"` Mem1EloBefore int Mem1EloAfter int Mem2EloBefore int Mem2EloAfter int Mem3EloBefore int Mem3EloAfter int Mem4EloBefore int Mem4EloAfter int }
func (*Match) GetMatchInfo ¶
type Member ¶
type Team ¶
type Team struct { gorm.Model Tournament Tournament `gorm:"ForeignKey:TournamentID"` TournamentID uint Member1 Member `gorm:"ForeignKey:Member1ID"` Member1ID uint Member2 Member `gorm:"ForeignKey:Member2ID"` Member2ID uint PlayedMatches int GF int GA int GD int Points int }
func (*Team) LoadMembers ¶
func (Team) UpdateTeamScore ¶
type TeamRequest ¶
type Tournament ¶
type Tournament struct { gorm.Model Matches []Match `gorm:"ForeignKey:TournamentID"` Teams []Team `gorm:"ForeignKey:TournamentID"` }
func (*Tournament) CreateMatches ¶
func (tour *Tournament) CreateMatches(db *gorm.DB, teams []Team) []Match
func (*Tournament) CreateTeams ¶
func (tour *Tournament) CreateTeams(db *gorm.DB, request TeamRequest) []Team
func (Tournament) Delete ¶
func (tour Tournament) Delete(db *gorm.DB)
Click to show internal directories.
Click to hide internal directories.