FEAT: Corporate onboarding implemented with Tax ID validation (HU) and isolated NAS storage
This commit is contained in:
BIN
backend/app/schemas/__pycache__/asset.cpython-312.pyc
Normal file
BIN
backend/app/schemas/__pycache__/asset.cpython-312.pyc
Normal file
Binary file not shown.
BIN
backend/app/schemas/__pycache__/organization.cpython-312.pyc
Normal file
BIN
backend/app/schemas/__pycache__/organization.cpython-312.pyc
Normal file
Binary file not shown.
27
backend/app/schemas/asset.py
Normal file
27
backend/app/schemas/asset.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
from typing import Optional
|
||||
from uuid import UUID
|
||||
from datetime import datetime
|
||||
|
||||
class AssetCreate(BaseModel):
|
||||
catalog_id: int = Field(..., description="A kiválasztott katalógus elem ID-ja")
|
||||
vin: str = Field(..., min_length=17, max_length=17, description="17 karakteres alvázszám")
|
||||
license_plate: str = Field(..., min_length=1, max_length=20)
|
||||
name: Optional[str] = Field(None, description="Egyedi elnevezés (pl. 'Céges furgon')")
|
||||
organization_id: int = Field(..., description="Melyik flottába kerüljön")
|
||||
|
||||
# Opcionális: Kezdő km óra állás, szín, stb. később bővíthető
|
||||
|
||||
class AssetResponse(BaseModel):
|
||||
id: UUID
|
||||
uai: str
|
||||
catalog_id: int
|
||||
organization_id: int
|
||||
name: str
|
||||
asset_type: str
|
||||
current_plate_number: str
|
||||
status: str
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
20
backend/app/schemas/organization.py
Normal file
20
backend/app/schemas/organization.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional, List
|
||||
|
||||
class ContactCreate(BaseModel):
|
||||
full_name: str
|
||||
email: str
|
||||
phone: Optional[str]
|
||||
contact_type: str = "primary"
|
||||
|
||||
class CorpOnboardIn(BaseModel):
|
||||
name: str
|
||||
tax_number: str
|
||||
country_code: str = "HU"
|
||||
reg_number: Optional[str]
|
||||
headquarters_address: str
|
||||
contacts: Optional[List[ContactCreate]] = []
|
||||
|
||||
class CorpOnboardResponse(BaseModel):
|
||||
organization_id: int
|
||||
status: str = "pending_verification"
|
||||
Reference in New Issue
Block a user