Files
anyway/backend/src/structs/preferences.py
Remy Moll 07dde5ab58
All checks were successful
Build and push docker image / Build (pull_request) Successful in 1m48s
persistence for recurring api calls
2024-07-31 12:54:25 +02:00

21 lines
662 B
Python

from pydantic import BaseModel
from typing import Optional, Literal
class Preference(BaseModel) :
type: Literal['sightseeing', 'nature', 'shopping', 'start', 'finish']
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