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.

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_date_from  ยป  date_from๏ƒ

Validator for date_from field.

validator parse_date_to  ยป  date_to๏ƒ

Validator for date_to field.

validator parse_updated_at  ยป  updated_at๏ƒ

Converts the updated_at field to a datetime object with UTC timezone.