c8cb43ae1c
CI Build & Deploy Pipeline / Build Staging API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (pull_request) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 18s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m2s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m3s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1m35s
Auto Merge CI PRs / Auto Merge on CI Green + Approved (pull_request) Successful in 2m0s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m9s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m33s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 3m40s
AI Code Review / AI Code Review (pull_request) Successful in 4m24s
- 新增 format_utc_datetime 工具函数,统一输出带 Z 后缀的 ISO 8601 - 成片库 generated_at: 无时区字符串 -> 带 Z 的 UTC 时间 - 素材库 created_at: 无时区字符串 -> 带 Z 的 UTC 时间 - 任务列表 created_at/updated_at: datetime类型 -> 带 Z 的字符串 - 前端 new Date() 自动转本地时间,无需额外处理
52 lines
1.2 KiB
Python
Executable File
52 lines
1.2 KiB
Python
Executable File
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ProjectTaskResponse(BaseModel):
|
|
id: str
|
|
task_type: str
|
|
project_id: str
|
|
status: str
|
|
progress: float
|
|
current_step: str
|
|
error_message: str = ""
|
|
error_info: dict = Field(default_factory=dict)
|
|
user_message: str = ""
|
|
retryable: bool = False
|
|
retry_count: int = 0
|
|
source_id: str = ""
|
|
template_id: str = ""
|
|
created_at: str = ""
|
|
updated_at: str = ""
|
|
|
|
|
|
class ListProjectTasksResponse(BaseModel):
|
|
items: list[ProjectTaskResponse] = Field(default_factory=list)
|
|
total: int = 0
|
|
|
|
|
|
class UserTaskResponse(BaseModel):
|
|
"""用户级任务响应(跨 project,用于模板模式)。"""
|
|
|
|
id: str
|
|
task_type: str
|
|
project_id: str = ""
|
|
template_id: str = ""
|
|
status: str
|
|
progress: float
|
|
current_step: str
|
|
error_message: str = ""
|
|
error_info: dict = Field(default_factory=dict)
|
|
user_message: str = ""
|
|
retryable: bool = False
|
|
retry_count: int = 0
|
|
source_id: str = ""
|
|
created_at: str = ""
|
|
updated_at: str = ""
|
|
|
|
|
|
class ListTasksResponse(BaseModel):
|
|
"""用户级任务列表响应(GET /api/v1/tasks)。"""
|
|
|
|
items: list[UserTaskResponse] = Field(default_factory=list)
|
|
total: int = 0
|