feat(certificates): Base types
This commit is contained in:
parent
2537235ce6
commit
2108c88001
36
models/certificate.go
Normal file
36
models/certificate.go
Normal file
@ -0,0 +1,36 @@
|
||||
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"`
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user