feat: 동네 이야기 — 로그인하면 100자 글 쓰기(쓸 때 동네 날씨가 붙음, 전국에 보임), 좋아요·신고 3건 자동 숨김·이 사람 글 안 보기·내 글 지우기, 링크·전화번호 막기와 하루 5개 제한

This commit is contained in:
minaChoi committed 2026-10-20 13:11:20 +09:00
1 parent a8a126f6a5
commit 798286d975
18 files changed
+1356 -6

No files matched your search

+40
View File
@@ -372,3 +372,43 @@ class MyGak(Base):
index_a: Mapped[int] = mapped_column(SmallInteger)
index_b: Mapped[int] = mapped_column(SmallInteger)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
class Talk(Base):
__tablename__ = "talk"
talk_id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True))
region_code: Mapped[str] = mapped_column(String(10))
body: Mapped[str] = mapped_column(String(100))
weather: Mapped[Optional[str]] = mapped_column(String(30), nullable=True)
like_count: Mapped[int] = mapped_column(Integer, default=0)
report_count: Mapped[int] = mapped_column(Integer, default=0)
hidden: Mapped[bool] = mapped_column(Boolean, default=False)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
deleted: Mapped[bool] = mapped_column(Boolean, default=False)
class TalkLike(Base):
__tablename__ = "talk_like"
talk_id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
class TalkReport(Base):
__tablename__ = "talk_report"
talk_id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True)
reason: Mapped[int] = mapped_column(SmallInteger)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
class UserBlock(Base):
__tablename__ = "user_block"
user_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True)
blocked_id: Mapped[uuid.UUID] = mapped_column(UUID(as_uuid=True), primary_key=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
+9
View File
@@ -19,6 +19,8 @@ class ErrorType(Enum):
EXTERNAL_API_ERROR = 2001
NOT_FOUND = 3001
INVALID_INPUT = 3002
DAILY_LIMIT = 3003 # 하루에 쓸 수 있는 수를 넘음
LINK_NOT_ALLOWED = 3004 # 글에 링크·전화번호
AUTH_REQUIRED = 4001
AUTH_FAILED = 4002
AUTH_DUPLICATE_ID = 4003
@@ -113,6 +115,13 @@ class IndexCategory(CodeEnum):
LIFE = 4
class TalkReport(CodeEnum):
ABUSE = 1 # 욕설·비하
SPAM = 2 # 광고·도배
PRIVACY = 3 # 개인정보 노출
ETC = 4
class ArticleCategory(CodeEnum):
SEASON = 1
TIP = 2