added fixture scheduling

This commit is contained in:
2026-02-21 14:19:46 +11:00
parent 23a97787d5
commit b07c486421
13 changed files with 1703 additions and 18 deletions

View File

@@ -19,6 +19,13 @@ type Player struct {
User *User `bun:"rel:belongs-to,join:user_id=id" json:"-"`
}
func (p *Player) DisplayName() string {
if p.User != nil {
return p.User.Username
}
return p.Name
}
// NewPlayer creates a new player in the database. If there is an existing user with the same
// discordID, it will automatically link that user to the player
func NewPlayer(ctx context.Context, tx bun.Tx, discordID string, audit *AuditMeta) (*Player, error) {