feat: 카드뉴스 포스트(관리자 admin/, /v1/card API, 피드 이미지 슬라이드), 인스타 홍보 기획 문서

This commit is contained in:
minaChoi committed 2026-10-23 15:38:07 +09:00
1 parent 96cbd19c61
commit 739a8c59eb
107 files changed
+17684 -19

No files matched your search

+24 -1
View File
@@ -3,7 +3,7 @@ from datetime import date, datetime
from decimal import Decimal
from typing import Optional
from sqlalchemy import BigInteger, Boolean, Date, DateTime, Integer, Numeric, SmallInteger, String, func
from sqlalchemy import BigInteger, Boolean, Date, DateTime, ForeignKey, Integer, LargeBinary, Numeric, SmallInteger, String, Text, func
from sqlalchemy.dialects.postgresql import JSONB, UUID
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
@@ -309,6 +309,29 @@ class Post(Base):
deleted: Mapped[bool] = mapped_column(Boolean, default=False)
class CardSet(Base):
__tablename__ = "card_set"
card_id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
template: Mapped[str] = mapped_column(String(20))
topic: Mapped[Optional[str]] = mapped_column(String(60), nullable=True)
title: Mapped[str] = mapped_column(String(80))
caption: Mapped[str] = mapped_column(Text, default="")
copy: Mapped[dict] = mapped_column(JSONB, default=dict)
status: Mapped[int] = mapped_column(SmallInteger, default=1)
post_id: Mapped[Optional[int]] = mapped_column(BigInteger, nullable=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
published_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True)
class CardImage(Base):
__tablename__ = "card_image"
card_id: Mapped[int] = mapped_column(BigInteger, ForeignKey("card_set.card_id", ondelete="CASCADE"), primary_key=True)
seq: Mapped[int] = mapped_column(SmallInteger, primary_key=True)
data: Mapped[bytes] = mapped_column(LargeBinary)
class User(Base):
__tablename__ = "users"