uuid7으로 필드 및 처리관련 수정

This commit is contained in:
Dohyun Lim committed 2026-01-28 16:35:08 +09:00
1 parent aa8d9d7c14
commit 32ae5530b6
26 files changed
+2346 -901

No files matched your search

+6
View File
@@ -23,6 +23,8 @@ from sqlalchemy.ext.asyncio import AsyncSession
from app.database.session import get_session
from app.dependencies.pagination import PaginationParams, get_pagination_params
from app.user.dependencies.auth import get_current_user
from app.user.models import User
from app.home.models import Image, Project
from app.lyric.models import Lyric
from app.song.models import Song, SongTimestamp
@@ -96,6 +98,7 @@ async def generate_video(
default="vertical",
description="영상 방향 (horizontal: 가로형, vertical: 세로형)",
),
current_user: User = Depends(get_current_user),
) -> GenerateVideoResponse:
"""Creatomate API를 통해 영상을 생성합니다.
@@ -489,6 +492,7 @@ GET /video/status/render-id-123...
async def get_video_status(
creatomate_render_id: str,
background_tasks: BackgroundTasks,
current_user: User = Depends(get_current_user),
session: AsyncSession = Depends(get_session),
) -> PollingVideoResponse:
"""creatomate_render_id로 영상 생성 작업의 상태를 조회합니다.
@@ -629,6 +633,7 @@ GET /video/download/019123ab-cdef-7890-abcd-ef1234567890
)
async def download_video(
task_id: str,
current_user: User = Depends(get_current_user),
session: AsyncSession = Depends(get_session),
) -> DownloadVideoResponse:
"""task_id로 Video 상태를 polling하고 completed 시 Project 정보와 영상 URL을 반환합니다."""
@@ -743,6 +748,7 @@ GET /videos/?page=1&page_size=10
},
)
async def get_videos(
current_user: User = Depends(get_current_user),
session: AsyncSession = Depends(get_session),
pagination: PaginationParams = Depends(get_pagination_params),
) -> PaginatedResponse[VideoListItem]:
+3 -3
View File
@@ -24,7 +24,7 @@ class Video(Base):
project_id: 연결된 Project의 id (외래키)
lyric_id: 연결된 Lyric의 id (외래키)
song_id: 연결된 Song의 id (외래키)
task_id: 영상 생성 작업의 고유 식별자 (KSUID 형식)
task_id: 영상 생성 작업의 고유 식별자 (UUID7 형식)
status: 처리 상태 (pending, processing, completed, failed 등)
result_movie_url: 생성된 영상 URL (S3, CDN 경로)
created_at: 생성 일시 (자동 설정)
@@ -78,10 +78,10 @@ class Video(Base):
)
task_id: Mapped[str] = mapped_column(
String(27),
String(36),
nullable=False,
unique=True,
comment="영상 생성 작업 고유 식별자 (KSUID)",
comment="영상 생성 작업 고유 식별자 (UUID7)",
)
creatomate_render_id: Mapped[Optional[str]] = mapped_column(