52ff2f80ad
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
33 lines
773 B
Python
33 lines
773 B
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class RecentTaskItem(BaseModel):
|
|
id: str
|
|
task_type: str = "generation"
|
|
status: str
|
|
current_step: str = ""
|
|
error_message: str = ""
|
|
updated_at: datetime | None = None
|
|
|
|
|
|
class SubscriptionInfo(BaseModel):
|
|
"""用户订阅信息。"""
|
|
|
|
plan: str = "free"
|
|
is_active: bool = False
|
|
|
|
|
|
class DashboardOverviewResponse(BaseModel):
|
|
"""Dashboard 概览数据。"""
|
|
|
|
total_assets: int = 0
|
|
used_storage_bytes: int = 0
|
|
total_titles: int = 0
|
|
total_voices: int = 0
|
|
total_tasks: int = 0
|
|
total_products: int = 0
|
|
subscription: SubscriptionInfo = Field(default_factory=SubscriptionInfo)
|
|
recent_tasks: list[RecentTaskItem] = Field(default_factory=list)
|