uuid7으로 필드 및 처리관련 수정
This commit is contained in:
1 parent
aa8d9d7c14
commit
32ae5530b6
26 files changed
+2346
-901
No files matched your search
@@ -18,6 +18,8 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.database.session import get_session
|
||||
from app.home.models import Project
|
||||
from app.user.dependencies.auth import get_current_user
|
||||
from app.user.models import User
|
||||
from app.lyric.models import Lyric
|
||||
from app.song.models import Song, SongTimestamp
|
||||
from app.song.schemas.song_schema import (
|
||||
@@ -79,6 +81,7 @@ POST /song/generate/019123ab-cdef-7890-abcd-ef1234567890
|
||||
async def generate_song(
|
||||
task_id: str,
|
||||
request_body: GenerateSongRequest,
|
||||
current_user: User = Depends(get_current_user),
|
||||
) -> GenerateSongResponse:
|
||||
"""가사와 장르를 기반으로 Suno API를 통해 노래를 생성합니다.
|
||||
|
||||
@@ -347,6 +350,7 @@ GET /song/status/abc123...
|
||||
async def get_song_status(
|
||||
song_id: str,
|
||||
background_tasks: BackgroundTasks,
|
||||
current_user: User = Depends(get_current_user),
|
||||
session: AsyncSession = Depends(get_session),
|
||||
) -> PollingSongResponse:
|
||||
"""song_id로 노래 생성 작업의 상태를 조회합니다.
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ class Song(Base):
|
||||
id: 고유 식별자 (자동 증가)
|
||||
project_id: 연결된 Project의 id (외래키)
|
||||
lyric_id: 연결된 Lyric의 id (외래키)
|
||||
task_id: 노래 생성 작업의 고유 식별자 (KSUID 형식)
|
||||
task_id: 노래 생성 작업의 고유 식별자 (UUID7 형식)
|
||||
suno_task_id: Suno API 작업 고유 식별자 (선택)
|
||||
status: 처리 상태 (processing, uploading, completed, failed)
|
||||
song_prompt: 노래 생성에 사용된 프롬프트
|
||||
@@ -72,10 +72,10 @@ class Song(Base):
|
||||
)
|
||||
|
||||
task_id: Mapped[str] = mapped_column(
|
||||
String(27),
|
||||
String(36),
|
||||
nullable=False,
|
||||
unique=True,
|
||||
comment="노래 생성 작업 고유 식별자 (KSUID)",
|
||||
comment="노래 생성 작업 고유 식별자 (UUID7)",
|
||||
)
|
||||
|
||||
suno_task_id: Mapped[Optional[str]] = mapped_column(
|
||||
|
||||
Reference in new issue
Block a user