PIbd-42_SSPR/network/schemas.py
2024-12-09 22:32:11 +03:00

80 lines
1.9 KiB
Python

from enum import Enum
from typing import Optional, Dict, Tuple, List
from psycopg.types import enum
from pydantic import BaseModel, ConfigDict
class ExperimentParametersPyDOE3(BaseModel):
param_ranges: Dict[str, Tuple[float, float]]
count_exp: int
round_rules: List[int]
class ExperimentParameters(BaseModel):
outer_blades_count: str
outer_blades_length: str
outer_blades_angle: str
middle_blades_count: str
load: str
recycling: str
class ExperimentParametersPlot(BaseModel):
file_id: str
additional_dimension: str
range: Tuple[float, float]
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 ExperimentCategoryBody(BaseModel):
model_config = ConfigDict(from_attributes=True)
name: 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