generated from schreifuchs/wails-template
added matches
This commit is contained in:
@ -19,26 +19,26 @@ type Participant struct {
|
||||
|
||||
type Tournament struct {
|
||||
gorm.Model
|
||||
Title string
|
||||
GameID int
|
||||
Game Game `gorm:"foreignKey:GameID"`
|
||||
Size int // number of prarticipants
|
||||
TournamentState int
|
||||
WinnierParticipantID int
|
||||
WinnierParticipant Participant `gorm:"foreignKey:WinnierParticipantID"`
|
||||
Participants []*Participant `gorm:"many2many:partcipant_tournaments;"`
|
||||
Matches []Match
|
||||
Title string
|
||||
GameID int
|
||||
Game Game `gorm:"foreignKey:GameID"`
|
||||
Size int // number of prarticipants
|
||||
TournamentState int
|
||||
WinnerParticipantID int
|
||||
WinnerParticipant Participant `gorm:"foreignKey:WinnerParticipantID"`
|
||||
Participants []*Participant `gorm:"many2many:partcipant_tournaments;"`
|
||||
Matches []Match
|
||||
}
|
||||
|
||||
type Match struct {
|
||||
gorm.Model
|
||||
TournamentID uint
|
||||
Stage int
|
||||
Order int
|
||||
Participant1ID uint
|
||||
Participant1 Participant `gorm:"foreignKey:Participant1ID"`
|
||||
Participant2ID uint
|
||||
Participant2 Participant `gorm:"foreignKey:Participant2ID"`
|
||||
WinnierParticipantID uint
|
||||
WinnierParticipant Participant `gorm:"foreignKey:WinnierParticipantID"`
|
||||
TournamentID uint
|
||||
Stage int
|
||||
Order int
|
||||
Participant1ID uint
|
||||
Participant1 Participant `gorm:"foreignKey:Participant1ID"`
|
||||
Participant2ID uint
|
||||
Participant2 Participant `gorm:"foreignKey:Participant2ID"`
|
||||
WinnerParticipantID uint
|
||||
WinnerParticipant Participant `gorm:"foreignKey:WinnerParticipantID"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user