8064b64ff5
1. 修正上传端点schema命名:新增UploadAssetRequest模型替代自动生成的Body_upload_asset名称 2. 清理认证重复端点:移除/forgot-password和/reset-password旧路由,保留/password/forgot和/password/reset 3. 清理workspace_id残留:从edit_plan/asset_diagnosis/task_center/project_title等schema中移除,project_management和projects中改为可选 4. 更新README:移除过时的多租户/订阅/refresh token描述,修正仓库地址为git.xiaoxiajianji.com,更新API路径列表
61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class EditTemplateResponse(BaseModel):
|
|
id: str
|
|
project_id: str
|
|
name: str
|
|
description: str
|
|
target_duration: float
|
|
clip_count: int
|
|
is_active: bool
|
|
created_at: datetime | None = None
|
|
|
|
|
|
class EditPlanClipResponse(BaseModel):
|
|
id: str
|
|
asset_id: str
|
|
asset_name: str
|
|
sequence: int
|
|
start_time: float
|
|
duration: float
|
|
reason: str
|
|
layer: str = "main" # main, pip, broll
|
|
|
|
|
|
class EditPlanResponse(BaseModel):
|
|
id: str
|
|
project_id: str
|
|
template_id: str
|
|
asset_library_id: str
|
|
title_id: str = ""
|
|
status: str
|
|
summary: str
|
|
editing_mode: str | None = None # one_take, pip, voice_over, voice_pip
|
|
clips: list[EditPlanClipResponse] = Field(default_factory=list)
|
|
created_at: datetime | None = None
|
|
updated_at: datetime | None = None
|
|
|
|
|
|
class CreateEditPlanRequest(BaseModel):
|
|
asset_library_id: str
|
|
template_id: str = ""
|
|
title_id: str = ""
|
|
|
|
|
|
class AutoGenerateEditPlanRequest(BaseModel):
|
|
"""智能生成剪辑计划请求"""
|
|
asset_library_id: str
|
|
editing_mode: str = Field(
|
|
default="one_take",
|
|
description="剪辑模式: one_take, pip, voice_over, voice_pip"
|
|
)
|
|
target_duration: float = Field(
|
|
default=30.0,
|
|
description="目标时长(秒)"
|
|
)
|
|
template_id: str = ""
|
|
title_id: str = ""
|