add stats to memberships

This commit is contained in:
Laurent Le Houerou 2024-04-18 14:48:16 +04:00
parent c693dd2017
commit 5624a07607

View File

@ -40,6 +40,20 @@ type CardSupply struct {
Unique int `graphql:"unique"`
}
type MembershipStats struct {
Season struct {
StartYear int `graphql:"startYear"`
} `graphql:"season"`
Appearances int `graphql:"appearances"`
Goals int `graphql:"goals"`
Assists int `graphql:"assists"`
YellowCards int `graphql:"yellowCards"`
RedCards int `graphql:"redCards"`
MinutesPlayed int `graphql:"minutesPlayed"`
SubstituteIn int `graphql:"substituteIn"`
SubstituteOut int `graphql:"substituteOut"`
}
type Membership struct {
Id graphql.Id `graphql:"id"`
StartDate time.Time `graphql:"startDate"`
@ -53,6 +67,7 @@ type Membership struct {
Slug string `graphql:"slug"`
} `graphql:"... on NationalTeam"`
} `graphql:"membershipTeam"`
Stats []MembershipStats `graphql:"stats"`
}
type Player struct {