Improve the frontend 2

This commit is contained in:
Urtzi Alfaro
2025-10-29 06:58:05 +01:00
parent 858d985c92
commit 36217a2729
98 changed files with 6652 additions and 4230 deletions

View File

@@ -57,7 +57,7 @@ class BakeryRegistration(BaseModel):
return v
class TenantResponse(BaseModel):
"""Tenant response schema - FIXED VERSION"""
"""Tenant response schema - Updated to use subscription relationship"""
id: str # ✅ Keep as str for Pydantic validation
name: str
subdomain: Optional[str]
@@ -68,12 +68,12 @@ class TenantResponse(BaseModel):
postal_code: str
phone: Optional[str]
is_active: bool
subscription_tier: str
subscription_plan: Optional[str] = None # Populated from subscription relationship or service
ml_model_trained: bool
last_training_date: Optional[datetime]
owner_id: str # ✅ Keep as str for Pydantic validation
created_at: datetime
# ✅ FIX: Add custom validator to convert UUID to string
@field_validator('id', 'owner_id', mode='before')
@classmethod
@@ -82,7 +82,7 @@ class TenantResponse(BaseModel):
if isinstance(v, UUID):
return str(v)
return v
class Config:
from_attributes = True