37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package models
|
|
|
|
type CertificateRequest struct {
|
|
Runners []RunnerWithDonations `json:"runners"`
|
|
Locale string `json:"locale" enums:"en,de"`
|
|
}
|
|
|
|
type RunnerWithDonations struct {
|
|
ID int `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
MiddleName string `json:"middle_name"`
|
|
LastName string `json:"last_name"`
|
|
Group Group `json:"group"`
|
|
Distance int `json:"distance"`
|
|
DistanceDonations []DistanceDonation `json:"distance_donations"`
|
|
}
|
|
|
|
type DistanceDonation struct {
|
|
ID int `json:"id"`
|
|
Amount int `json:"amount"`
|
|
PaidAmount int `json:"paid_amount"`
|
|
AmountPerDistance int `json:"amount_per_distance"`
|
|
Donor Donor `json:"donor"`
|
|
}
|
|
|
|
type Donor struct {
|
|
ID int `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
MiddleName string `json:"middle_name"`
|
|
LastName string `json:"last_name"`
|
|
}
|
|
|
|
type CertificateTemplateOptions struct {
|
|
Runners []RunnerWithDonations `json:"runners"`
|
|
EventName string `json:"event_name"`
|
|
}
|