mirror of
https://github.com/sstent/AICyclingCoach.git
synced 2026-01-25 16:41:58 +00:00
25 lines
531 B
Python
25 lines
531 B
Python
from pydantic import BaseModel
|
|
from typing import Optional, List
|
|
|
|
class GPXData(BaseModel):
|
|
total_distance: float
|
|
elevation_gain: float
|
|
points: List[dict]
|
|
|
|
class RouteCreate(BaseModel):
|
|
name: str
|
|
description: Optional[str] = None
|
|
total_distance: float
|
|
elevation_gain: float
|
|
gpx_file_path: str
|
|
|
|
class Route(BaseModel):
|
|
id: str
|
|
name: str
|
|
description: Optional[str] = None
|
|
total_distance: float
|
|
elevation_gain: float
|
|
gpx_file_path: str
|
|
|
|
class Config:
|
|
orm_mode = True |