Initial commit - Trekker V2 source
This commit is contained in:
commit
d71faf19e3
65 files changed
+3615
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""Offline map pack metadata."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.models.route import new_id, utcnow_iso
|
||||
|
||||
|
||||
class MapPack(BaseModel):
|
||||
id: str = Field(default_factory=new_id)
|
||||
name: str = "Offline area"
|
||||
bbox: list[float] = Field(default_factory=list) # [min_lon, min_lat, max_lon, max_lat]
|
||||
min_zoom: int = 8
|
||||
max_zoom: int = 14
|
||||
layers: list[str] = Field(default_factory=lambda: ["base"])
|
||||
status: str = "queued" # queued | downloading | ready | failed
|
||||
error: Optional[str] = None
|
||||
path: Optional[str] = None
|
||||
size_bytes: int = 0
|
||||
tile_count: int = 0
|
||||
tiles_done: int = 0
|
||||
created_at: str = Field(default_factory=utcnow_iso)
|
||||
updated_at: str = Field(default_factory=utcnow_iso)
|
||||
Reference in new issue
Block a user