anyway/backend/src/structs/preferences.py

22 lines
658 B
Python

from pydantic import BaseModel
from typing import Optional, Literal
class Preference(BaseModel) :
name: str
type: Literal['sightseeing', 'nature', 'shopping']
score: int # score could be from 1 to 5
# Input for optimization
class Preferences(BaseModel) :
# Sightseeing / History & Culture (Musées, bâtiments historiques, opéras, églises)
sightseeing : Preference
# Nature (parcs, jardins, rivières, plages)
nature: Preference
# Shopping (diriger plutôt vers des zones / rues commerçantes)
shopping : Preference
max_time_minute: Optional[int] = 6*60
detour_tolerance_minute: Optional[int] = 0