This commit is contained in:
Michal Kváček
2025-09-18 22:02:25 +02:00
parent 71911c0905
commit d794208193
29 changed files with 668 additions and 523 deletions
+17
View File
@@ -0,0 +1,17 @@
from sqlalchemy import String, JSON
from sqlalchemy.orm import mapped_column, Mapped
from database.models.base_model import BaseModel
class Airspace(BaseModel):
__tablename__ = "airspace"
id: Mapped[int] = mapped_column(primary_key=True)
country: Mapped[str] = mapped_column(String(8), nullable=False, index=True)
name: Mapped[str] = mapped_column(String(128), nullable=False, unique=True)
type: Mapped[str] = mapped_column(String(8), nullable=False, index=True)
lower_limit: Mapped[str] = mapped_column(String(32), nullable=False)
lower_alt_unit: Mapped[str] = mapped_column(String(8), nullable=False)
upper_limit: Mapped[str] = mapped_column(String(32), nullable=False)
upper_alt_unit: Mapped[str] = mapped_column(String(8), nullable=False)
bounds: Mapped[list[tuple[float, float]]] = mapped_column(JSON())