2024-05-23 04:18:54 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Player struct {
|
|
|
|
Slug string `bun:"slug,pk" json:"slug"`
|
|
|
|
DisplayName string `bun:"display_name" json:"displayName"`
|
|
|
|
BirthDate time.Time `bun:"birth_date" json:"birthDate"`
|
|
|
|
CountrySlug string `bun:"country_slug" json:"countrySlug"`
|
|
|
|
TeamSlug *string `bun:"team_slug" json:"teamSlug"`
|
|
|
|
DomesticLeagueSlug *string `bun:"domestic_league_slug" json:"domesticLeagueSlug"`
|
|
|
|
AvatarUrl string `bun:"avatar_url" json:"avatarUrl"`
|
|
|
|
FieldPosition string `bun:"field_position" json:"fieldPosition"`
|
|
|
|
Status string `bun:"status" json:"status"`
|
|
|
|
ShirtNumber int `bun:"shirt_number" json:"shirtNumber"`
|
|
|
|
ActiveNationalTeamSlug *string `bun:"active_national_team_slug" json:"activeNationalTeamSlug"`
|
|
|
|
|
|
|
|
Country *Country `bun:"rel:has-one,join:country_slug=slug" json:"country"`
|
|
|
|
Team *Team `bun:"rel:has-one,join:team_slug=slug" json:"team"`
|
|
|
|
DomesticLeague *Competition `bun:"rel:has-one,join:domestic_league_slug=slug" json:"domesticLeague"`
|
|
|
|
CardSupply []CardSupply `bun:"rel:has-many,join:slug=player_slug" json:"cardSupply"`
|
|
|
|
ClubMembership []Membership `bun:"rel:has-many,join:slug=player_slug" json:"clubMembership"`
|
2024-06-06 05:52:54 +00:00
|
|
|
|
|
|
|
GamePlayers []GamePlayer `bun:"rel:has-many,join:slug=player_slug" json:"gamePlayers"`
|
2024-05-23 04:18:54 +00:00
|
|
|
}
|