Improve demo tennat and user get
This commit is contained in:
@@ -16,8 +16,33 @@ class DemoSessionCreate(BaseModel):
|
||||
user_agent: Optional[str] = None
|
||||
|
||||
|
||||
class DemoUser(BaseModel):
|
||||
"""Demo user data returned in session response"""
|
||||
id: str
|
||||
email: str
|
||||
full_name: str
|
||||
role: str
|
||||
is_active: bool
|
||||
is_verified: bool
|
||||
tenant_id: str
|
||||
created_at: str
|
||||
|
||||
|
||||
class DemoTenant(BaseModel):
|
||||
"""Demo tenant data returned in session response"""
|
||||
id: str
|
||||
name: str
|
||||
subdomain: str
|
||||
subscription_tier: str
|
||||
tenant_type: str
|
||||
business_type: Optional[str] = None
|
||||
business_model: Optional[str] = None
|
||||
description: Optional[str] = None
|
||||
is_active: bool
|
||||
|
||||
|
||||
class DemoSessionResponse(BaseModel):
|
||||
"""Demo session response"""
|
||||
"""Demo session response - mirrors a real login response with user and tenant data"""
|
||||
session_id: str
|
||||
virtual_tenant_id: str
|
||||
demo_account_type: str
|
||||
@@ -26,6 +51,11 @@ class DemoSessionResponse(BaseModel):
|
||||
expires_at: datetime
|
||||
demo_config: Dict[str, Any]
|
||||
session_token: str
|
||||
subscription_tier: str
|
||||
is_enterprise: bool
|
||||
# Complete user and tenant data (like a real login response)
|
||||
user: DemoUser
|
||||
tenant: DemoTenant
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
Reference in New Issue
Block a user