Files
Scoreboard/server/internal/dto/results.go
T

32 lines
1.2 KiB
Go

package dto
// EventResultGroup 是 snapshot.latestResults 的一组「小项 + 组别」成绩,
// 与 web/src/shared/types.ts 的 EventResultGroup 对齐。
type EventResultGroup struct {
EventID int64 `json:"eventId"`
EventCode string `json:"eventCode"`
EventName string `json:"eventName"`
CategoryID int64 `json:"categoryId"`
CategoryName string `json:"categoryName"`
PublishedAt *string `json:"publishedAt"`
Rows []EventResultRow `json:"rows"`
}
// EventResultRow 是组内的一条成绩行;字段与 types.ts 的 EventResultRow 一一对应。
type EventResultRow struct {
EntryID int64 `json:"entryId"`
Rank *int `json:"rank"`
TeamID int64 `json:"teamId"`
TeamCode string `json:"teamCode"`
TeamName string `json:"teamName"`
ShortName *string `json:"shortName"`
AthleteID *int64 `json:"athleteId"`
AthleteName *string `json:"athleteName"`
MemberNames []string `json:"memberNames"`
ResultText string `json:"resultText"`
ResultValue *float64 `json:"resultValue"`
Unit string `json:"unit"`
IsTie bool `json:"isTie"`
Status string `json:"status"`
}