dodalem backend dzialajacy

This commit is contained in:
2026-04-20 23:21:16 +02:00
parent 4707a49e06
commit 5361806f34
9 changed files with 468 additions and 303 deletions

30
backend/mayo/models.py Normal file
View File

@@ -0,0 +1,30 @@
from pydantic import BaseModel, Field
from typing import Dict, List, Optional
class MayoSearchResult(BaseModel):
order_id: str # eg 0001/2025
client: str
prod_list: str # eg STY-25
url: str # url whole order
guitars_url: List[str] = Field(default_factory=list) # urls concrete guitars
class MayoGuitarDetails(BaseModel):
order_number: str # eg 0001/2025/1
completion_date: str # eg 2025-01-31
client: str
model: str
spec: Dict[str, Dict[str, List[str]]]
class MayoResponse(BaseModel):
order_number: str # eg 0001/2025/1
completion_date: str # eg 2025-01-31
prod_list: str # eg STY-25
url: str # url of a specific guitar
client: str # reciever
model: str # guitar model
spec: Dict[str, Dict[str, List[str]]] # specification