14 lines
394 B
Python
14 lines
394 B
Python
from sqlalchemy import Column, Integer, VARCHAR
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.infrastructure.database.models import Base
|
|
|
|
|
|
class FederalDistrict(Base):
|
|
__tablename__ = 'federal_districts'
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
name = Column(VARCHAR(100), nullable=False)
|
|
|
|
cities = relationship('City', back_populates='federal_district')
|