16 lines
595 B
Python
16 lines
595 B
Python
from sqlalchemy import Column, Integer, String, DateTime
|
|
from sqlalchemy.sql import func
|
|
from .base import Base
|
|
|
|
class BikeSetup(Base):
|
|
__tablename__ = "bike_setups"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
frame = Column(String, nullable=False)
|
|
chainring = Column(Integer, nullable=False)
|
|
rear_cog = Column(Integer, nullable=False)
|
|
name = Column(String, nullable=True) # Optional, can be derived or user-set
|
|
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|