refactoring 1.1

This commit is contained in:
2025-12-21 18:18:26 +03:00
parent 46b4e95d45
commit 6b92cf8782
11 changed files with 62 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
from pydantic import BaseModel, Field, field_validator
from pydantic_settings import BaseSettings, SettingsConfigDict
class ExcelInfo(BaseModel):
arti:str = Field(..., min_length=5, max_length=12, description="arti of the clothes")
counts:int = Field(..., gt=0, description="the quantity of the clothes")
@@ -8,4 +9,35 @@ class ExcelRealization(BaseModel):
class ExcelReturning(BaseModel):
pass
class ExcelOut(BaseModel):
pass
pass
class Settings(BaseSettings):
DIR:str
PATTERN: str
USERNAME: str
PASSWORD: str
URL_REPORT:str
URL_REALISATION:str
BUYER: str
COMPANY: str
STORE: str
CONTRAGENT_RWB:str
CONTRAGENT_OZON:str
CONTRAGENT_YANDEX:str
CONTRACT_RWB0:str
CONTRACT_RWB1:str
CONTRACT_RWB2:str
MEASURE:str
A60_01:str
A62_02:str
A60_02:str
A62_01:str
A45_02:str
A90_01_1:str
A90_02_1:str
A90_03:str
A76_09:str
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8"
)
settings = Settings()