-
Notifications
You must be signed in to change notification settings - Fork 0
/
schemas.py
47 lines (31 loc) · 864 Bytes
/
schemas.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
from typing import List, Union
import datetime
from pydantic import BaseModel
class EnvMonitorBase(BaseModel):
temperature01: int
temperature02: int
class EnvMonitorCreate(EnvMonitorBase):
pass
class EnvMonitor(EnvMonitorBase):
id: int
timestamp: datetime.datetime
class Config:
orm_mode = True
class UBLBase(BaseModel):
redshift_entitled: int
redshift_used: int
redshift_available: int
# allow None since a migration happened and None was default
nuke_entitled: int | None = ...
nuke_used: int | None = ...
nuke_available: int | None = ...
vray_entitled: int | None = ...
vray_used: int | None = ...
vray_available: int | None = ...
class UBLCreate(UBLBase):
pass
class UBL(UBLBase):
id: int
timestamp: datetime.datetime
class Config:
orm_mode = True