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": "string" }, "date_from": { "anyOf": [ { "type": "string" }, { "format": "date-time", "type": "string" } ], "description": "The start date of the competition in YYYY/MM/DD format.", "title": "Start Date" }, "date_to": { "anyOf": [ { "type": "string" }, { "format": "date-time", "type": "string" } ], "description": "The end date of the competition in YYYY/MM/DD format.", "title": "End Date" }, "name": { "description": "The name of the competition.", "title": "Competition Name", "type": "string" }, "has_results": { "default": null, "description": "Indicates if results are available.", "title": "Results Available", "type": "integer" }, "city": { "description": "The city where the competition is held.", "title": "City", "type": "string" }, "street": { "default": null, "description": "The street where the competition venue is located.", "title": "Street", "type": "string" }, "street_no": { "default": null, "description": "The street number of the competition venue.", "title": "Street Number", "type": "string" }, "comp_year": { "default": null, "description": "The year in which the competition takes place.", "title": "Competition Year", "type": "integer" }, "prime_event": { "default": null, "description": "Indicates if this is a prime event.", "title": "Prime Event", "type": "boolean" }, "continent_short": { "default": null, "description": "The short code for the continent.", "title": "Continent Code", "type": "string" }, "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": { "default": null, "description": "The last update date and time.", "format": "date-time", "title": "Last Updated", "type": "string" }, "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": "integer" }, "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": { "default": null, "description": "The ID of the draw type.", "title": "Draw Type ID", "type": "integer" }, "ages": { "default": null, "description": "List of age categories for the competition.", "items": { "type": "string" }, "title": "Age Categories", "type": "array" }, "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:
- Validators:
- field ages: list[str] = 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๏
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๏
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: str | datetime [Required]๏
The start date of the competition in YYYY/MM/DD format.
- Validated by:
- field date_to: str | datetime [Required]๏
The end date of the competition in YYYY/MM/DD format.
- Validated by:
- field external_id: str | None = None๏
The external identifier for the competition.
- field has_logo: bool = False๏
Indicates if the competition has a logo.
- field has_results: int = None๏
Indicates if results are available.
- field id_competition: str [Required]๏
The unique identifier for the competition.
- field id_country: int [Required]๏
The unique identifier for the country.
- field id_draw_type: int = 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: int [Required]๏
Indicates if the competition is a team event.
- field name: str [Required]๏
The name of the competition.
- field prime_event: bool = None๏
Indicates if this is a prime event.
- field rank_name: str | None = None๏
The ranking name associated with the competition.
- field status: str | None = None๏
The status of the competition.
- field street: str = None๏
The street where the competition venue is located.
- field street_no: str = None๏
The street number of the competition venue.
- field timezone: str | None = None๏
The timezone of the competition.
- field updated_at: datetime = None๏
The last update date and time.
- Validated by:
- field updated_at_ts: datetime [Required]๏
The timestamp of the last update.
- static parse_date(value)๏
Helper method to convert a string to a datetime object with UTC timezone.
- validator parse_updated_at ยป updated_at๏
Converts the updated_at field to a datetime object with UTC timezone.