Files
Excel-project/server/backend/schemas/pydantic.py
2026-01-08 19:25:19 +03:00

71 lines
1.6 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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")
price:float = Field(..., gt=0, description="the price of the clothes")
ref_key:str = Field(..., description="reffering key from db")
class ExcelRealization(BaseModel):
pass
class ExcelReturning(BaseModel):
pass
class ExcelOut(BaseModel):
pass
class Settings(BaseSettings):
DIR:str
PATTERN: str
TIMEFORMAT:str
USERNAME: str
PASSWORD: str
URL_REPORT:str
URL_REALISATION:str
URL_CONTRACTORS:str
URL_NOMENCLATURE:str
URL_COMPANIES:str
URL_STORAGES:str
BUYER: str
COMPANY: str
STORE: str
CONTRAGENT_RWB:str
CONTRAGENT_OZON:str
CONTRAGENT_YANDEX:str
CONTRACT_RWB:str
CONTRACT_RWB1:str
CONTRACT_YAN:str
CONTRACT_OZON:str
MEASURE:str
A60_01:str
A62_02:str
A60_02:str
A62_01:str
A45_02:str
A43:str
A90_01_1:str
A90_02_1:str
A90_03:str
A76_09:str
A44_01:str
A19_04:str
TYPE1:str
TYPE2:str
TYPE3:str
TYPE4:str
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8"
)
class Translit():
TRANSLIT = {
'А': 'A',
'В': 'B',
'Е': 'E',
'К': 'K',
'М': 'M',
'Н': 'H',
'О': 'O',
'Р': 'P',
'С': 'C',
'Т': 'T',
'Х': 'X',
}
settings = Settings()