Files
xiaoxia-saas/apps/api/app/schemas/edit_plan.py
T
CI Bot 1dd1dca473
Deploy / Deploy Staging (push) Successful in 1m45s
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
fix: 统一编辑模式枚举名并删除重复workflow
1. 修复 edit_plan_generator.py 中的枚举名与 editing_modes.py 保持一致:
   - ONE_TAKE: one-take -> one_take
   - VOICEOVER -> VOICE_OVER: voiceover -> voice_over

2. 更新相关文档字符串和注释

3. 删除重复的 .gitea/workflows/tests.yml (ci-cd.yml 已包含完整测试)
2026-06-26 23:12:06 +08:00

65 lines
1.5 KiB
Python

from datetime import datetime
from pydantic import BaseModel, Field
class EditTemplateResponse(BaseModel):
id: str
workspace_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
workspace_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):
workspace_id: str
asset_library_id: str
template_id: str = ""
title_id: str = ""
class AutoGenerateEditPlanRequest(BaseModel):
"""智能生成剪辑计划请求"""
workspace_id: str
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 = ""