talos-access / backend /app /models /section_schedule.py
Greg
Claude Opus 4.7 (1M context)
Preparar despliegue en fly.io: monolito dockerizado + seeder demo
6aa6081
Raw History Blame Contribute Delete
672 Bytes
from sqlalchemy import Column, BigInteger, Integer, String, ForeignKey
from app.core.database import Base
class SectionSchedule(Base):
__tablename__ = "section_schedules"
id = Column(BigInteger, primary_key=True, autoincrement=True)
section_id = Column(BigInteger, ForeignKey("sections.id", ondelete="CASCADE"), nullable=False)
account_id = Column(BigInteger, ForeignKey("accounts.id"), nullable=False)
day_of_week = Column(Integer, nullable=False)
entry_time = Column(String(5), nullable=False)
exit_time = Column(String(5), nullable=False)
subject_id = Column(BigInteger, ForeignKey("subjects.id", ondelete="SET NULL"), nullable=True)