18 lines
923 B
Go
18 lines
923 B
Go
package model
|
|
|
|
type Team struct {
|
|
Slug string `bun:"slug,pk" json:"slug"`
|
|
DisplayName string `bun:"display_name" json:"displayName"`
|
|
CountrySlug string `bun:"country_slug" json:"countrySlug"`
|
|
DomesticLeagueSlug *string `bun:"domestic_league_slug" json:"domesticLeagueSlug"`
|
|
ShortName string `bun:"short_name" json:"shortName"`
|
|
PictureUrl string `bun:"picture_url" json:"pictureUrl"`
|
|
TeamType string `bun:"team_type" json:"teamType"`
|
|
|
|
Country *Country `bun:"rel:has-one,join:country_slug=slug" json:"country"`
|
|
DomesticLeague *Competition `bun:"rel:has-one,join:domestic_league_slug=slug" json:"domesticLeague"`
|
|
|
|
HomeGames []Game `bun:"rel:has-many,join:slug=home_team_slug" json:"homeGames"`
|
|
AwayGames []Game `bun:"rel:has-many,join:slug=away_team_slug" json:"awayGames"`
|
|
}
|