사용자의 uuid -> ksuid로 변경, 테이블 구조 변경
This commit is contained in:
1 parent
dc7351d0f9
commit
aa8d9d7c14
13 files changed
+170
-75
No files matched your search
+9
-8
@@ -149,7 +149,7 @@ class Project(Base):
|
||||
id: 고유 식별자 (자동 증가)
|
||||
store_name: 고객명 (필수)
|
||||
region: 지역명 (필수, 예: 서울, 부산, 대구 등)
|
||||
task_id: 작업 고유 식별자 (UUID 형식, 36자)
|
||||
task_id: 작업 고유 식별자 (KSUID 형식, 27자)
|
||||
detail_region_info: 상세 지역 정보 (선택, JSON 또는 텍스트 형식)
|
||||
created_at: 생성 일시 (자동 설정)
|
||||
|
||||
@@ -184,21 +184,20 @@ class Project(Base):
|
||||
store_name: Mapped[str] = mapped_column(
|
||||
String(255),
|
||||
nullable=False,
|
||||
index=True,
|
||||
comment="가게명",
|
||||
)
|
||||
|
||||
region: Mapped[str] = mapped_column(
|
||||
String(100),
|
||||
nullable=False,
|
||||
index=True,
|
||||
comment="지역명 (예: 군산)",
|
||||
)
|
||||
|
||||
task_id: Mapped[str] = mapped_column(
|
||||
String(36),
|
||||
String(27),
|
||||
nullable=False,
|
||||
comment="프로젝트 작업 고유 식별자 (UUID)",
|
||||
unique=True,
|
||||
comment="프로젝트 작업 고유 식별자 (KSUID)",
|
||||
)
|
||||
|
||||
detail_region_info: Mapped[Optional[str]] = mapped_column(
|
||||
@@ -281,7 +280,7 @@ class Image(Base):
|
||||
|
||||
Attributes:
|
||||
id: 고유 식별자 (자동 증가)
|
||||
task_id: 이미지 업로드 작업 고유 식별자 (UUID)
|
||||
task_id: 이미지 업로드 작업 고유 식별자 (KSUID)
|
||||
img_name: 이미지명
|
||||
img_url: 이미지 URL (S3, CDN 등의 경로)
|
||||
created_at: 생성 일시 (자동 설정)
|
||||
@@ -289,6 +288,7 @@ class Image(Base):
|
||||
|
||||
__tablename__ = "image"
|
||||
__table_args__ = (
|
||||
Index("idx_image_task_id", "task_id"),
|
||||
{
|
||||
"mysql_engine": "InnoDB",
|
||||
"mysql_charset": "utf8mb4",
|
||||
@@ -305,9 +305,10 @@ class Image(Base):
|
||||
)
|
||||
|
||||
task_id: Mapped[str] = mapped_column(
|
||||
String(36),
|
||||
String(27),
|
||||
nullable=False,
|
||||
comment="이미지 업로드 작업 고유 식별자 (UUID)",
|
||||
unique=True,
|
||||
comment="이미지 업로드 작업 고유 식별자 (KSUID)",
|
||||
)
|
||||
|
||||
img_name: Mapped[str] = mapped_column(
|
||||
|
||||
@@ -91,7 +91,7 @@ class GenerateUrlsRequest(GenerateRequestInfo):
|
||||
class GenerateUploadResponse(BaseModel):
|
||||
"""파일 업로드 기반 생성 응답 스키마"""
|
||||
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (UUID7)")
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (KSUID)")
|
||||
status: Literal["processing", "completed", "failed"] = Field(
|
||||
..., description="작업 상태"
|
||||
)
|
||||
@@ -102,7 +102,7 @@ class GenerateUploadResponse(BaseModel):
|
||||
class GenerateResponse(BaseModel):
|
||||
"""생성 응답 스키마"""
|
||||
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (UUID7)")
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (KSUID)")
|
||||
status: Literal["processing", "completed", "failed"] = Field(
|
||||
..., description="작업 상태"
|
||||
)
|
||||
@@ -291,7 +291,7 @@ class ImageUploadResponse(BaseModel):
|
||||
}
|
||||
)
|
||||
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (새로 생성된 UUID7)")
|
||||
task_id: str = Field(..., description="작업 고유 식별자 (새로 생성된 KSUID)")
|
||||
total_count: int = Field(..., description="총 업로드된 이미지 개수")
|
||||
url_count: int = Field(..., description="URL로 등록된 이미지 개수")
|
||||
file_count: int = Field(..., description="파일로 업로드된 이미지 개수")
|
||||
|
||||
Reference in new issue
Block a user