API/classes/models.py

26 lines
452 B
Python
Raw Normal View History

2023-12-14 02:18:57 +02:00
from typing import List, Literal
from pydantic import BaseModel
class CollectionEntry(BaseModel):
locations: List[int]
garbage_type: Literal[0, 1, 2, 3, 4, 5]
date: str
class Location(BaseModel):
id: int
name: str
location: List[int]
country: int
timezone: str
class SearchResultsCollectionEntry(BaseModel):
results: List[CollectionEntry]
class SearchResultsLocation(BaseModel):
results: List[Location]