Files
xiaoxia-saas/apps/api/app/schemas/edit_plan.py
T
CI Test f5bc1b8947
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Waiting to run
Tests / test (pull_request) Waiting to run
Tests / lint (pull_request) Waiting to run
CI/CD Pipeline / Validate Code Quality And Tests (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
chore: squash merge feature/smart-edit-plan into develop (resolve conflicts)
- Resolve CI/CD and deploy workflow conflicts with develop version
- Resolve database and dependencies conflicts with develop version
- Keep new edit plan generator and API functionality from feature branch
2026-06-26 21:21:39 +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, voiceover, 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, voiceover, voice_pip"
)
target_duration: float = Field(
default=30.0,
description="目标时长(秒)"
)
template_id: str = ""
title_id: str = ""