You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Group represents a racer group (e.g., age group, division)
|
|
type Group struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
// Racer represents a derby racer
|
|
type Racer struct {
|
|
ID int64 `json:"id"`
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
CarNumber string `json:"car_number"`
|
|
CarWeight float64 `json:"car_weight"`
|
|
GroupID int64 `json:"group_id"`
|
|
GroupName string `json:"group_name,omitempty"` // For display purposes
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
// Race represents a derby race event
|
|
type Race struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"` // pending, running, completed
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
// RaceResult represents the result of a racer in a race
|
|
type RaceResult struct {
|
|
ID int64 `json:"id"`
|
|
RaceID int64 `json:"race_id"`
|
|
RacerID int64 `json:"racer_id"`
|
|
Lane int `json:"lane"`
|
|
Time *float64 `json:"time,omitempty"`
|
|
Place *int `json:"place,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|