new_bild
This commit is contained in:
11
app/models/district.py
Normal file
11
app/models/district.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user