# Generated by ariadne-codegen on 2023-06-06 10:49
# Source: graphql/queries.graphql

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel


class TeamStandings(BaseModel):
    team_standings: Optional[List[Optional["TeamStandingsTeamStandings"]]] = Field(
        alias="teamStandings"
    )


class TeamStandingsTeamStandings(BaseModel):
    id: Optional[int]
    phase_id: Optional[int] = Field(alias="phaseId")
    unit_id: Optional[int] = Field(alias="unitId")
    type: Optional[str]
    competition_intermediate_id: Optional[int] = Field(
        alias="competitionIntermediateId"
    )
    competition_intermediate_name: Optional[str] = Field(
        alias="competitionIntermediateName"
    )
    rank: Optional[int]
    team_id: Optional[int] = Field(alias="teamId")
    team_id__w_a: Optional[int] = Field(alias="teamId_WA")
    team_name: Optional[str] = Field(alias="teamName")
    team_country_code: Optional[str] = Field(alias="teamCountryCode")
    standing_mark: Optional[str] = Field(alias="standingMark")
    live_current: Optional[bool] = Field(alias="liveCurrent")
    updated_on: Optional[Any] = Field(alias="updatedOn")
    team_standing_id: Optional[int] = Field(alias="teamStandingId")
    competition_intermediate_order: Optional[int] = Field(
        alias="competitionIntermediateOrder"
    )
    detail_rank: Optional[int] = Field(alias="detailRank")
    standing_detail_bib: Optional[str] = Field(alias="standingDetailBib")
    competitor_id: Optional[List[Optional[int]]] = Field(alias="competitorId")
    related_athlete: Optional[
        List[Optional["TeamStandingsTeamStandingsRelatedAthlete"]]
    ] = Field(alias="relatedAthlete")
    standing_detail_score: Optional[str] = Field(alias="standingDetailScore")
    standing_detail_scoring: Optional[str] = Field(alias="standingDetailScoring")
    team_standing_order: Optional[int] = Field(alias="teamStandingOrder")
    team_standing_detail_order: Optional[int] = Field(alias="teamStandingDetailOrder")
    event_store_id: Optional[str] = Field(alias="eventStoreId")
    chunk_order: Optional[int] = Field(alias="chunkOrder")
    chunk_id: Optional[str] = Field(alias="chunkId")


class TeamStandingsTeamStandingsRelatedAthlete(BaseModel):
    competitor_id: Optional[List[Optional[int]]] = Field(alias="competitorId")
    detail: Optional[List[Optional["TeamStandingsTeamStandingsRelatedAthleteDetail"]]]
    first_name: Optional[str] = Field(alias="firstName")
    last_name: Optional[str] = Field(alias="lastName")
    birth_date: Optional[Any] = Field(alias="birthDate")
    birth_place: Optional[str] = Field(alias="birthPlace")
    birth_country_code: Optional[str] = Field(alias="birthCountryCode")
    birth_place_country_name: Optional[str] = Field(alias="birthPlaceCountryName")
    team_name: Optional[str] = Field(alias="teamName")
    country_name: Optional[str] = Field(alias="countryName")
    country_code: Optional[str] = Field(alias="countryCode")
    sex_code: Optional[str] = Field(alias="sexCode")
    sex_name: Optional[str] = Field(alias="sexName")


class TeamStandingsTeamStandingsRelatedAthleteDetail(BaseModel):
    id: Optional[int]
    updated_on: Optional[Any] = Field(alias="updatedOn")
    hash: Optional[str]
    type_code: Optional[str] = Field(alias="typeCode")
    first_name: Optional[str] = Field(alias="firstName")
    last_name: Optional[str] = Field(alias="lastName")
    sex_code: Optional[str] = Field(alias="sexCode")
    sex_name: Optional[str] = Field(alias="sexName")
    country_code: Optional[str] = Field(alias="countryCode")
    country_name: Optional[str] = Field(alias="countryName")
    birth_date_str: Optional[str] = Field(alias="birthDateStr")
    url_slug: Optional[str] = Field(alias="urlSlug")
    representative_id: Optional[int] = Field(alias="representativeId")
    name: Optional[str]
    country_url_slug: Optional[str] = Field(alias="countryUrlSlug")
    sex_name_url_slug: Optional[str] = Field(alias="sexNameUrlSlug")
    friendly_name: Optional[str] = Field(alias="friendlyName")
    friendly_name_letter: Optional[str] = Field(alias="friendlyNameLetter")
    friendly_name_first3_letter: Optional[str] = Field(alias="friendlyNameFirst3Letter")


TeamStandings.update_forward_refs()
TeamStandingsTeamStandings.update_forward_refs()
TeamStandingsTeamStandingsRelatedAthlete.update_forward_refs()
TeamStandingsTeamStandingsRelatedAthleteDetail.update_forward_refs()
