judobase.schemas.Competition

pydantic model judobase.schemas.Competition

Represents the data about competition which provide the judobase api.

Show JSON schema
{
   "title": "Competition",
   "description": "Represents the data about competition which provide the judobase api.",
   "type": "object",
   "properties": {
      "id_competition": {
         "description": "The unique identifier for the competition.",
         "title": "Competition ID",
         "type": "integer"
      },
      "date_from": {
         "description": "The start day of the competition.",
         "format": "date",
         "title": "Start Date",
         "type": "string"
      },
      "date_to": {
         "description": "The end day of the competition.",
         "format": "date",
         "title": "End Date",
         "type": "string"
      },
      "name": {
         "description": "The name of the competition.",
         "title": "Competition Name",
         "type": "string"
      },
      "has_results": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The number of results available; 0 when there are none yet.",
         "title": "Results Count"
      },
      "city": {
         "description": "The city where the competition is held.",
         "title": "City",
         "type": "string"
      },
      "street": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The street where the competition venue is located.",
         "title": "Street"
      },
      "street_no": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The street number of the competition venue.",
         "title": "Street Number"
      },
      "comp_year": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The year in which the competition takes place.",
         "title": "Competition Year"
      },
      "prime_event": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Indicates if this is a prime event.",
         "title": "Prime Event"
      },
      "continent_short": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The short code for the continent.",
         "title": "Continent Code"
      },
      "has_logo": {
         "default": false,
         "description": "Indicates if the competition has a logo.",
         "title": "Has Logo",
         "type": "boolean"
      },
      "competition_code": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The unique code for the competition.",
         "title": "Competition Code"
      },
      "updated_at_ts": {
         "description": "The timestamp of the last update.",
         "format": "date-time",
         "title": "Last Updated Timestamp",
         "type": "string"
      },
      "updated_at": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The last update date and time.",
         "title": "Last Updated"
      },
      "timezone": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The timezone of the competition.",
         "title": "Timezone"
      },
      "id_live_theme": {
         "description": "The ID of the live theme used for the competition.",
         "title": "Live Theme ID",
         "type": "integer"
      },
      "code_live_theme": {
         "description": "The code of the live theme used.",
         "title": "Live Theme Code",
         "type": "string"
      },
      "country_short": {
         "description": "The short code for the country.",
         "title": "Country Short Code",
         "type": "string"
      },
      "country": {
         "description": "The country where the competition is held.",
         "title": "Country",
         "type": "string"
      },
      "id_country": {
         "description": "The unique identifier for the country.",
         "title": "Country ID",
         "type": "integer"
      },
      "is_teams": {
         "description": "Indicates if the competition is a team event.",
         "title": "Team Competition",
         "type": "boolean"
      },
      "status": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The status of the competition.",
         "title": "Status"
      },
      "external_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The external identifier for the competition.",
         "title": "External ID"
      },
      "id_draw_type": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The ID of the draw type.",
         "title": "Draw Type ID"
      },
      "ages": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of age categories for the competition.",
         "title": "Age Categories"
      },
      "rank_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "The ranking name associated with the competition.",
         "title": "Ranking Name"
      }
   },
   "required": [
      "id_competition",
      "date_from",
      "date_to",
      "name",
      "city",
      "updated_at_ts",
      "id_live_theme",
      "code_live_theme",
      "country_short",
      "country",
      "id_country",
      "is_teams"
   ]
}

Fields:
field ages: list[str] | None = None

List of age categories for the competition.

field city: str [Required]

The city where the competition is held.

field code_live_theme: str [Required]

The code of the live theme used.

field comp_year: int | None = None

The year in which the competition takes place.

field competition_code: str | None = None

The unique code for the competition.

field continent_short: str | None = None

The short code for the continent.

field country: str [Required]

The country where the competition is held.

field country_short: str [Required]

The short code for the country.

field date_from: Annotated[date, BeforeValidator(func=_to_day, json_schema_input_type=PydanticUndefined)] [Required]

The start day of the competition.

Constraints:
  • func = <function _to_day at 0x731c8398c860>

  • json_schema_input_type = PydanticUndefined

field date_to: Annotated[date, BeforeValidator(func=_to_day, json_schema_input_type=PydanticUndefined)] [Required]

The end day of the competition.

Constraints:
  • func = <function _to_day at 0x731c8398c860>

  • json_schema_input_type = PydanticUndefined

field external_id: str | None = None

The external identifier for the competition.

Indicates if the competition has a logo.

field has_results: int | None = None

The number of results available; 0 when there are none yet.

field id_competition: int [Required]

The unique identifier for the competition.

field id_country: int [Required]

The unique identifier for the country.

field id_draw_type: int | None = None

The ID of the draw type.

field id_live_theme: int [Required]

The ID of the live theme used for the competition.

field is_teams: bool [Required]

Indicates if the competition is a team event.

field name: str [Required]

The name of the competition.

field prime_event: bool | None = None

Indicates if this is a prime event.

field rank_name: str | None = None

The ranking name associated with the competition.

field status: Annotated[str | None, BeforeValidator(func=_number_to_text, json_schema_input_type=PydanticUndefined)] = None

The status of the competition.

Constraints:
  • func = <function _number_to_text at 0x731c8393c7c0>

  • json_schema_input_type = PydanticUndefined

field street: str | None = None

The street where the competition venue is located.

field street_no: str | None = None

The street number of the competition venue.

field timezone: str | None = None

The timezone of the competition.

field updated_at: Annotated[datetime, AfterValidator(func=_to_utc)] | None = None

The last update date and time.

field updated_at_ts: Annotated[datetime, AfterValidator(func=_to_utc)] [Required]

The timestamp of the last update.

Constraints:
  • func = <function _to_utc at 0x731c8393c680>