mirror of
https://github.com/sstent/aicyclingcoach-go.git
synced 2026-03-06 21:15:24 +00:00
sync
This commit is contained in:
14
backend/app/models/route.py
Normal file
14
backend/app/models/route.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from sqlalchemy import Column, String, Float, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from .base import BaseModel
|
||||
|
||||
class Route(BaseModel):
|
||||
__tablename__ = "routes"
|
||||
|
||||
name = Column(String(100), nullable=False)
|
||||
description = Column(String(500))
|
||||
total_distance = Column(Float, nullable=False)
|
||||
elevation_gain = Column(Float, nullable=False)
|
||||
gpx_file_path = Column(String(255), nullable=False)
|
||||
|
||||
sections = relationship("Section", back_populates="route", cascade="all, delete-orphan")
|
||||
Reference in New Issue
Block a user