export type RaceStatus = "planned" | "registered" | "completed";

export interface Race {
  id: string;
  date: string;
  title: string;
  distanceKm: number;
  status: RaceStatus | null;
  officialUrl: string | null;
  startTime: string | null;
  clusterSchedule: string | null;
  bibPickup: string | null;
  bibNumber: string | null;
  finishTime: string | null;
  finishPlace: string | null;
  notes: string | null;
  createdAt: string;
  updatedAt: string | null;
}

export interface RacesQuery {
  year?: number;
  month?: number;
}

export interface CreateRacePayload {
  id: string;
  date: string;
  title: string;
  distanceKm: number;
  status?: RaceStatus | null;
  officialUrl?: string | null;
  startTime?: string | null;
  clusterSchedule?: string | null;
  bibPickup?: string | null;
  bibNumber?: string | null;
  finishTime?: string | null;
  finishPlace?: string | null;
  notes?: string | null;
}

export type UpdateRacePayload = Partial<Omit<CreateRacePayload, "id">>;
