11 lines
436 B
Python
11 lines
436 B
Python
from sqlalchemy import String, Integer, ForeignKey
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from app.models.base import Base
|
|
|
|
class District(Base):
|
|
__tablename__ = "districts"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True)
|
|
name: Mapped[str] = mapped_column(String(50))
|
|
max_clients: Mapped[int] = mapped_column(Integer)
|
|
owner_id: Mapped[int | None] = mapped_column(ForeignKey("players.id"), nullable=True) |