32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package models
|
|
|
|
type ContractRequest struct {
|
|
Runners []Runner `json:"runners" validate:"required"`
|
|
Locale string `json:"locale" enums:"en,de" validate:"required"`
|
|
}
|
|
|
|
type Runner struct {
|
|
ID int `json:"id" validate:"required"`
|
|
FirstName string `json:"first_name" validate:"required"`
|
|
MiddleName string `json:"middle_name" validate:"optional"`
|
|
LastName string `json:"last_name" validate:"required"`
|
|
Group Group `json:"group" validate:"required"`
|
|
}
|
|
|
|
type Group struct {
|
|
Name string `json:"name" validate:"required"`
|
|
ParentGroup struct {
|
|
Name string `json:"name" validate:"required"`
|
|
} `json:"parent_group" validate:"optional"`
|
|
}
|
|
|
|
type ContractTemplateOptions struct {
|
|
Runners []Runner `json:"runners"`
|
|
CurrencySymbol string `json:"currency_symbol"`
|
|
Disclaimer string `json:"disclaimer"`
|
|
ReceiptMinimumAmount string `json:"receipt_minimum_amount"`
|
|
EventName string `json:"event_name"`
|
|
BarcodeFormat string `json:"barcode_format"`
|
|
BarcodePrefix string `json:"barcode_prefix"`
|
|
}
|