PIbd-42_SSPR/network/schemas.py
AnnZhimol 49e327005e Update Database:
+ch_experiment_data in click_house
+experiment_data and experiment_parameters in postgresql
+experiment_data has foreign_key from experiment_parameters
+new connections
+realize routes for ch_experiment_data
+new alg csv_to_db
+new methods in repos
+update dockerfile
+update readme "how to init db"
2024-10-25 01:02:31 +03:00

59 lines
1.4 KiB
Python

from typing import Optional
from pydantic import BaseModel, ConfigDict
class ExperimentParameters(BaseModel):
outer_blades_count: str
outer_blades_length: str
outer_blades_angle: str
middle_blades_count: str
load: str
recycling: str
class ChExperimentDBExperimentDataBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
volume: float
nitrogen_oxide_emission: float
temperature: float
co_fraction: float
co2_fraction: float
x: float
y: float
z: float
file_id: str
class ExperimentDataBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
direction: float
temperature: float
nox: float
co2: float
co: float
file_id: Optional[str]
class ExperimentParametersBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
outer_blades_count: int
outer_blades_length: float
outer_blades_angle: float
middle_blades_count: int
load_id: Optional[int]
recycling_id: Optional[int]
experiment_hash: str
class LoadParametersBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
load: int
primary_air_consumption: float
secondary_air_consumption: float
gas_inlet_consumption: float
class RecyclingParametersBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
load_id: Optional[int]
recycling_level: int
co2: float
n2: float
h2o: float
o2: float