horse_racing Table
Overview
| Item | Details |
|---|---|
| Table name | horse_racing |
| Description | Race information, race results and AI predictions for horse racing. Referenced by article.race_id / blog.race_id / old_blog.race_id and used as input for AI article and blog generation. Race videos are stored as horse_racing/video/{race_id}.mp4 and course images as horse_racing/course_image/{race_id}.gif; course images exist for horse racing only. |
| Primary use | Storing race information, results and AI predictions; feeding article and blog generation |
Column Definitions
| Column | Type | PK | FK | Unique | Nullable | Default | Notes |
|---|---|---|---|---|---|---|---|
| _id | string | โฏ | โฏ | Stores the race_id from the uploaded race result JSON (not a DocumentDB-generated id). Unique across racing types |
|||
| name | string | Filename of the uploaded race result JSON without .json. Starts with the date, so lexical sort equals race-date order |
|||||
| race_result | object | The uploaded race result JSON, stored verbatim | |||||
| prediction | object | โฏ | Pre-race entry list and AI prediction marks, attached later via PUT /v1/races/prediction. Null when not yet collected |
||||
| created_at | number | ||||||
| updated_at | number | ||||||
| deleted_at | number | โฏ |
Racing type is expressed by the collection
Race documents carry no type field. The racing type is the collection itself
(auto_racing / bicycle_racing / horse_racing), and the API searches across all three.
List ordering
Listing (GET /v1/races?type=...) sorts by name (descending by default). name is the race
result JSON filename (e.g. 20260504_้ฃฏๅก_05R), which begins with the date, so lexical order is
race-date order. This differs from the updated_at ordering used by the other tables.