talos-access / backend /app /models /section_subject.py
Greg
Claude Opus 4.7 (1M context)
Preparar despliegue en fly.io: monolito dockerizado + seeder demo
6aa6081
Raw History Blame Contribute Delete
544 Bytes
from sqlalchemy import Column, BigInteger, ForeignKey, PrimaryKeyConstraint
from app.core.database import Base
class SectionSubject(Base):
__tablename__ = "section_subjects"
section_id = Column(BigInteger, ForeignKey("sections.id", ondelete="CASCADE"), nullable=False)
subject_id = Column(BigInteger, ForeignKey("subjects.id", ondelete="CASCADE"), nullable=False)
account_id = Column(BigInteger, ForeignKey("accounts.id"), nullable=False)
__table_args__ = (
PrimaryKeyConstraint("section_id", "subject_id"),
)