Spaces:
Build error
Build error
File size: 407 Bytes
b7a7f32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship
from core.db import Base
class Program(Base):
id = Column(Integer, primary_key=True)
name = Column(String(length=64))
department_id = Column(Integer, ForeignKey("department.id", ondelete="cascade"))
department = relationship("Department", backref="programs")
__tablename__ = "program"
|