40cb1ab8f3
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Successful in 59s
CI/CD Pipeline / Unit Tests (push) Successful in 3m13s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 3m27s
CI/CD Pipeline / Integration Tests (push) Successful in 1m32s
CI Build & Deploy Pipeline / Build Staging API Image (push) Has been cancelled
CI Build & Deploy Pipeline / Build Staging Web Image (push) Has been cancelled
CI Build & Deploy Pipeline / Build Staging Worker Image (push) Has been cancelled
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI Build & Deploy Pipeline / Staging E2E Tests (push) Has been cancelled
CI Build & Deploy Pipeline / Staging API Integration Tests (push) Has been cancelled
CI Build & Deploy Pipeline / Build Production API Image (push) Has been cancelled
CI Build & Deploy Pipeline / Build Production Web Image (push) Has been cancelled
CI Build & Deploy Pipeline / Build Production Worker Image (push) Has been cancelled
CI Build & Deploy Pipeline / Deploy Production (push) Has been cancelled
CI Build & Deploy Pipeline / Production Browser E2E (push) Has been cancelled
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
59 lines
1.4 KiB
Python
Executable File
59 lines
1.4 KiB
Python
Executable File
from typing import Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
VideoReviewStatus = Literal["pending_review", "approved", "rejected"]
|
|
|
|
|
|
class VideoItemResponse(BaseModel):
|
|
id: str
|
|
project_id: str
|
|
generation_task_id: str
|
|
name: str
|
|
file_url: str
|
|
file_size: int
|
|
duration: float
|
|
thumbnail_url: str | None = None
|
|
width: int
|
|
height: int
|
|
fps: float
|
|
status: str = "completed"
|
|
review_status: str = "pending_review"
|
|
generation_params: dict = Field(default_factory=dict)
|
|
download_url: str | None = None
|
|
generated_at: str = ""
|
|
|
|
|
|
class ListVideosResponse(BaseModel):
|
|
items: list[VideoItemResponse]
|
|
total: int
|
|
page: int
|
|
page_size: int
|
|
|
|
|
|
class UpdateVideoReviewRequest(BaseModel):
|
|
review_status: VideoReviewStatus
|
|
|
|
|
|
MAX_BATCH_DELETE_SIZE = 200
|
|
|
|
|
|
class BatchDeleteRequest(BaseModel):
|
|
video_ids: list[str] = Field(..., min_length=1, max_length=MAX_BATCH_DELETE_SIZE, description="要删除的成片ID列表")
|
|
|
|
|
|
class BatchOperationResponse(BaseModel):
|
|
success_count: int = Field(..., ge=0, description="成功删除数量")
|
|
failed_ids: list[str] = Field(default_factory=list, description="失败的ID列表")
|
|
failed_details: dict[str, str] = Field(default_factory=dict, description="失败详情")
|
|
|
|
|
|
class BatchDownloadRequest(BaseModel):
|
|
video_ids: list[str]
|
|
|
|
|
|
class BatchDownloadResponse(BaseModel):
|
|
job_id: str
|
|
status: str = "pending"
|
|
download_url: str | None = None
|