move from clubmemberships to memberships to get also national memberships

This commit is contained in:
Laurent Le Houerou 2024-04-07 13:51:04 +04:00
parent 06c49983aa
commit 8041f6835f

View File

@ -40,13 +40,19 @@ type CardSupply struct {
Unique int `graphql:"unique"`
}
type ClubMembership struct {
Id graphql.Id `graphql:"id"`
Club struct {
Slug string `graphql:"slug"`
} `graphql:"club"`
StartDate time.Time `graphql:"startDate"`
EndDate *time.Time `graphql:"endDate"`
type Membership struct {
Id graphql.Id `graphql:"id"`
StartDate time.Time `graphql:"startDate"`
EndDate *time.Time `graphql:"endDate"`
MembershipTeam struct {
TypeName string `graphql:"__typename"`
Club struct {
Slug string `graphql:"slug"`
} `graphql:"... on Club"`
NationalTeam struct {
Slug string `graphql:"slug"`
} `graphql:"... on NationalTeam"`
} `graphql:"membershipTeam"`
}
type Player struct {
@ -68,8 +74,8 @@ type Player struct {
BirthDate time.Time `graphql:"birthDate"`
CardPositions []types.Position `graphql:"cardPositions"`
CardSupply []CardSupply `graphql:"cardSupply"`
ClubMemberships []ClubMembership `graphql:"clubMemberships"`
Id graphql.Id `graphql:"id"`
Memberships []Membership `graphql:"memberships"`
Slug string `graphql:"slug"`
DisplayName string `graphql:"displayName"`
FirstName string `graphql:"firstName"`