Merge commit '46171b4f24f2ddc3b9212b9ad6769925bcaceb03' into feature/site-features-and-mockup
# Conflicts: # .env.example # solution/backend/common/enums.py # solution/backend/requirements.txt # solution/backend/services/site_payload.py # solution/backend/services/snapshot.py # solution/backend/services/weather_notes.json # solution/shared/src/types/site-payload.ts # solution/site/src/layouts/editorial/Shell.tsx # solution/site/src/lib/use-live-weather.ts # solution/site/src/pages/HomePage.tsx # solution/site/src/sections/SiteFooter.tsx # solution/site/src/sections/WeatherSection.tsx # solution/site/src/sections/index.ts
This commit is contained in:
commit
b78486b845
74 files changed
+3266
-193
No files matched your search
@@ -34,6 +34,7 @@ class Provider(Enum):
|
||||
GEMINI = "gemini"
|
||||
TOUR_API = "tour_api"
|
||||
OPEN_METEO = "open_meteo"
|
||||
THREADS = "threads"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -57,6 +58,7 @@ class Rate:
|
||||
# ★ 확정된 것만 confirmed=True 다. 나머지는 자리만 잡아둔 추정치이므로
|
||||
# 공식 단가표를 확인해서 교체하기 전에는 실배치를 돌리면 안 된다.
|
||||
RATES: dict[Provider, Rate] = {
|
||||
Provider.THREADS: Rate(confirmed=False, source="공개 과금 미확인 — API_USAGE 5절; 계정 계약비는 별도"),
|
||||
# 레포에 확정값이 있다(.env.example): 키워드/카테고리 검색 2원, 좌표 변환 0.5원.
|
||||
# 좌표 변환은 per_call 로 따로 세지 않고 호출측이 kakao_coord 로 구분해 넘긴다.
|
||||
Provider.KAKAO: Rate(
|
||||
|
||||
@@ -680,3 +680,45 @@ class jobs(MainTableMixin, MAIN_BASE):
|
||||
worker_id = Column(String(80), nullable=True) # 현재 점유 워커
|
||||
run_started_at = Column(DateTime(timezone=True), nullable=True) # RUNNING 진입 시각
|
||||
last_error = Column(Text, nullable=True)
|
||||
|
||||
|
||||
class owner_social_accounts(MainTableMixin, MAIN_BASE):
|
||||
__tablename__ = "owner_social_accounts"
|
||||
account_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
user_id = Column(UUID(as_uuid=True), nullable=False)
|
||||
provider = Column(SmallInteger, nullable=False)
|
||||
provider_user_id = Column(String(200), nullable=False)
|
||||
handle = Column(String(200), nullable=False)
|
||||
profile_url = Column(Text, nullable=False)
|
||||
access_token = Column(Text, nullable=True)
|
||||
refresh_token = Column(Text, nullable=True)
|
||||
access_expires_at = Column(DateTime(timezone=True), nullable=True)
|
||||
scopes = Column(JSONB, nullable=False, server_default=text("'[]'"))
|
||||
status = Column(String(20), nullable=False, server_default=text("'linked'"))
|
||||
last_error = Column(Text, nullable=True)
|
||||
__table_args__ = (Index("uq_social_account", "user_id", "provider", unique=True, postgresql_where=text("deleted=false AND status IN ('linked','needs_reauth')")),)
|
||||
|
||||
|
||||
class place_social_posts(MainTableMixin, MAIN_BASE):
|
||||
__tablename__ = "place_social_posts"
|
||||
post_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
place_id = Column(UUID(as_uuid=True), nullable=False)
|
||||
user_id = Column(UUID(as_uuid=True), nullable=False)
|
||||
site_version_id = Column(UUID(as_uuid=True), nullable=False)
|
||||
account_id = Column(UUID(as_uuid=True), nullable=True)
|
||||
provider = Column(SmallInteger, nullable=False)
|
||||
body = Column(Text, nullable=False, server_default=text("''"))
|
||||
link_url = Column(Text, nullable=False)
|
||||
grounded_facts = Column(JSONB, nullable=False, server_default=text("'[]'"))
|
||||
status = Column(String(24), nullable=False, server_default=text("'DRAFTING'"))
|
||||
approval_token_sha = Column(String(64), nullable=True)
|
||||
approval_sent_at = Column(DateTime(timezone=True), nullable=True)
|
||||
approval_channel = Column(String(20), nullable=True)
|
||||
approval_expires_at = Column(DateTime(timezone=True), nullable=True)
|
||||
decided_at = Column(DateTime(timezone=True), nullable=True)
|
||||
decided_via = Column(String(20), nullable=True)
|
||||
provider_post_id = Column(String(200), nullable=True)
|
||||
permalink = Column(Text, nullable=True)
|
||||
posted_at = Column(DateTime(timezone=True), nullable=True)
|
||||
last_error = Column(Text, nullable=True)
|
||||
__table_args__ = (Index("uq_social_version", "place_id", "site_version_id", unique=True, postgresql_where=text("deleted=false")), Index("idx_social_posted", "place_id", "posted_at", postgresql_where=text("deleted=false AND status='POSTED'")),)
|
||||
@@ -435,6 +435,8 @@ class JobType(CodeEnum):
|
||||
BUILD = 4 # 사이트 정적 빌드 — ★ 개별 재빌드 단위
|
||||
LOCAL_SYNC = 5 # 지역 정보 갱신 — 행정구역 코드 단위(같은 지역 사이트 50개여도 1회)
|
||||
AI_CHECK = 6 # AI 검색 노출 점검
|
||||
SOCIAL_DRAFT = 8
|
||||
SOCIAL_POST = 9
|
||||
SONG = 7 # 이 숙소의 노래 한 곡 (가사 Gemini → 작곡 Suno). 발행이 이 잡을 건다
|
||||
ROLLBACK = 8 # 예전 버전 스냅샷으로 다시 굽고 공개 주소를 그 버전으로 되돌림
|
||||
|
||||
@@ -484,6 +486,24 @@ class ReviewStatus(CodeEnum):
|
||||
REJECTED = 3 # 반려
|
||||
|
||||
|
||||
class SocialProvider(CodeEnum):
|
||||
X = 1
|
||||
THREADS = 2
|
||||
|
||||
|
||||
class SocialPostStatus(str, Enum):
|
||||
DRAFTING = "DRAFTING"
|
||||
DRAFT = "DRAFT"
|
||||
PENDING_APPROVAL = "PENDING_APPROVAL"
|
||||
APPROVED = "APPROVED"
|
||||
POSTING = "POSTING"
|
||||
POSTED = "POSTED"
|
||||
DECLINED = "DECLINED"
|
||||
EXPIRED = "EXPIRED"
|
||||
FAILED = "FAILED"
|
||||
UNKNOWN = "UNKNOWN" # 응답 유실·워커 중단: 자동 재시도는 중복 게시가 된다.
|
||||
|
||||
|
||||
class AlertStatus(CodeEnum):
|
||||
"""alert_outbox.status 코드값. services/alert_service.py 가 이 상태로 재시도를 판단한다."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user