feat(ssulbox): SNS 제목·설명·태그를 ssul_content에 저장
영상과 같이 업로드·SEO 결과를 행에 남기고, 다음 요청부터는 DB 값을 쓴다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fde48e8674
commit
e47a97476d
9 files changed
+108
-36
No files matched your search
+26
-9
@@ -31,6 +31,7 @@ from sqlalchemy import (
|
||||
Text,
|
||||
func,
|
||||
)
|
||||
from sqlalchemy.dialects.mysql import JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.database.session import Base
|
||||
@@ -164,9 +165,27 @@ class SsulContent(Base):
|
||||
)
|
||||
|
||||
poster_url: Mapped[Optional[str]] = mapped_column(
|
||||
String(500),
|
||||
String(2048),
|
||||
nullable=True,
|
||||
comment="포스터 URL (없으면 프론트가 시나리오 표지로 대체)",
|
||||
comment="포스터 URL (SNS 공유 og:image. 없으면 프론트가 시나리오 표지로 대체)",
|
||||
)
|
||||
|
||||
title: Mapped[Optional[str]] = mapped_column(
|
||||
String(100),
|
||||
nullable=True,
|
||||
comment="SNS 업로드 제목",
|
||||
)
|
||||
|
||||
description: Mapped[Optional[str]] = mapped_column(
|
||||
Text,
|
||||
nullable=True,
|
||||
comment="SNS 업로드 설명",
|
||||
)
|
||||
|
||||
hashtags: Mapped[Optional[list]] = mapped_column(
|
||||
JSON,
|
||||
nullable=True,
|
||||
comment="SNS 해시태그 목록",
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
@@ -205,13 +224,11 @@ class SsulContent(Base):
|
||||
comment="상세 지역 정보 (도로명 우선, 없으면 지번). 지역 필터 별칭 매칭용",
|
||||
)
|
||||
|
||||
# title / caption / views / like_count / comment_count 는 두지 않는다.
|
||||
# - castad `video` 도 제목을 갖지 않고 목록 표시는 store_name 으로 한다.
|
||||
# SNS 업로드 제목·설명은 업로드 시점에 작성해 social_upload 에 담고,
|
||||
# 다운로드 파일명은 프론트가 정한다.
|
||||
# - 좋아요/댓글 수는 castad `video_reaction` / `comment` 상관 서브쿼리로 집계한다
|
||||
# (2026-07-30 병합. 썰박스 행은 content_id 가 채워진다).
|
||||
# 카운터를 들면 쓰기 경로마다 갱신해야 하고 드리프트가 생긴다.
|
||||
# views / like_count / comment_count 는 두지 않는다.
|
||||
# 좋아요/댓글 수는 castad `video_reaction` / `comment` 상관 서브쿼리로 집계한다
|
||||
# (2026-07-30 병합. 썰박스 행은 content_id 가 채워진다).
|
||||
# 카운터를 들면 쓰기 경로마다 갱신해야 하고 드리프트가 생긴다.
|
||||
# SNS 제목·설명·태그는 video 와 같이 이 테이블에 저장한다.
|
||||
|
||||
is_deleted: Mapped[bool] = mapped_column(
|
||||
Boolean,
|
||||
|
||||
Reference in new issue
Block a user