project.py
726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from typing import List, Any, Dict
from presupuestov1.schema import BaseModel
class ProjectSearch(BaseModel):
gestion: int
devengado: float
is_class: bool
class_: str
texto: str
metadatos: str
class SearchHitHighlight(BaseModel):
field: str
matched_tokens: List[str]
snippet: str
class SearchHits(BaseModel):
document: ProjectSearch
highlights: List[SearchHitHighlight]
class SearchFacet_(BaseModel):
value: str
count: int
class SearchFacet(BaseModel):
counts: List[SearchFacet_]
field_name: str
class Search(BaseModel):
facet_counts: List[SearchFacet]
found: int
out_of: int
page: int
search_time_ms: int
hits: List[SearchHits]