New enterprise feature
This commit is contained in:
@@ -63,6 +63,8 @@ class TenantResponse(BaseModel):
|
||||
subdomain: Optional[str]
|
||||
business_type: str
|
||||
business_model: Optional[str]
|
||||
tenant_type: Optional[str] = "standalone" # standalone, parent, or child
|
||||
parent_tenant_id: Optional[str] = None # For child tenants
|
||||
address: str
|
||||
city: str
|
||||
postal_code: str
|
||||
@@ -75,7 +77,7 @@ class TenantResponse(BaseModel):
|
||||
created_at: datetime
|
||||
|
||||
# ✅ FIX: Add custom validator to convert UUID to string
|
||||
@field_validator('id', 'owner_id', mode='before')
|
||||
@field_validator('id', 'owner_id', 'parent_tenant_id', mode='before')
|
||||
@classmethod
|
||||
def convert_uuid_to_string(cls, v):
|
||||
"""Convert UUID objects to strings for JSON serialization"""
|
||||
|
||||
Reference in New Issue
Block a user