-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
72 lines (52 loc) · 1.42 KB
/
models.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import os
from pydantic import BaseModel
class Coords(BaseModel):
latitude: float
longitude: float
altitude: int
class Version(BaseModel):
major: int = 0
minor: int = 0
patch: int = 1
version: str = f'{major}.{minor}.{patch}'
class QAItem(BaseModel):
question: str
answer: str
class ChecklistItem(BaseModel):
description: str
checked: bool = False
class UserDataBalcony(BaseModel):
alignment: str = 'S'
shadowing: str = 'None'
class UserDataPV(BaseModel):
module_count: int = 2
module_power: int = 300
angle: int = 90
investment: int = int(os.getenv('INVEST_PRICE', 1000))
class UserDataConsumption(BaseModel):
amount: int = 2500
price: int = 40
class UserDataIn(BaseModel):
DataProcessingAccepted: bool = False
Location: Coords
PV: UserDataPV
Balcony: UserDataBalcony
Consumption: UserDataConsumption
TimePeriod: int = 1
class KpiResult(BaseModel):
energy_output_per_year: float = 0.0
usable_energy_per_year: float = 0.0
amortization: float = 0.0
savings: float = 0.0
savings_over_period: float = 0.0
price_per_kwh: float = 0.0
self_consumption: float = 0.0
realistic_savings: float = 0.0
class MastrDataOut(BaseModel):
id: str = ''
name: str = ''
state: str | None = None
zip: int | None = None
city: str | None = None
street: str | None = None
link: str | None = None