Initial commit - Trekker V2 source
This commit is contained in:
commit
d71faf19e3
65 files changed
+3615
No files matched your search
@@ -0,0 +1,23 @@
|
||||
"""Trip: a collection of routes with travelers and a date range."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from app.models.route import new_id, utcnow_iso
|
||||
|
||||
|
||||
class Trip(BaseModel):
|
||||
id: str = Field(default_factory=new_id)
|
||||
name: str = "Unnamed trip"
|
||||
route_ids: list[str] = Field(default_factory=list)
|
||||
travelers: list[str] = Field(default_factory=list)
|
||||
date_start: Optional[str] = None
|
||||
date_end: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
generated_asset_ids: list[str] = Field(default_factory=list)
|
||||
metadata: dict[str, Any] = Field(default_factory=dict)
|
||||
created_at: str = Field(default_factory=utcnow_iso)
|
||||
updated_at: str = Field(default_factory=utcnow_iso)
|
||||
Reference in new issue
Block a user