e3a8649b41
- 마이그레이션 009: perf_marketplaces.is_custom·is_group·parent_code - 설정: [+ 쇼핑몰 추가(수동 입력)]·[+ 그룹 추가], 이름 변경·삭제, 직접 추가 쇼핑몰 그룹 select - custom_ 코드는 registry.get_adapter 가 수동 입력 전용 어댑터(CustomManualAdapter)로 - 매출 실적 표: 그룹 열 = 보이는 하위 쇼핑몰 합계(일 합계엔 안 더함), ▾/▸ 하위 열 접기(localStorage) - 설정 표 ⠿ 드래그 → PUT /api/marketplace-order → sort_order, 화면 순서는 ordered_marketplaces 한 곳 - 테스트: test_custom_groups.py, perf_groups.browser.test.js Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
"""수동 입력 전용 쇼핑몰 — API 연동 없이 실적 일자별 표의 날짜 칸에 총매출을 직접 넣는다.
|
|
|
|
어댑터는 쇼핑몰의 "종류"만 알린다: 인증 항목이 없고(manual_only), 매출 업데이트(sync_all)에서 빠진다.
|
|
DB(perf_marketplaces)에는 manual_input = TRUE 로 넣는다(마이그레이션 003).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .base import MarketplaceAdapter
|
|
|
|
|
|
class ManualOnlyAdapter(MarketplaceAdapter):
|
|
auth_type = "manual"
|
|
manual_only = True
|
|
note = "API 연동 없이 실적 일자별 표의 날짜 칸에 총매출을 직접 입력합니다."
|
|
|
|
|
|
class CoupangRocketAdapter(ManualOnlyAdapter):
|
|
code = "coupang_rocket"
|
|
name = "쿠팡(로켓)"
|
|
|
|
|
|
class AtomyAzmallAdapter(ManualOnlyAdapter):
|
|
code = "atomy"
|
|
name = "애터미아자몰"
|
|
|
|
|
|
class CustomManualAdapter(ManualOnlyAdapter):
|
|
"""실적 설정에서 사용자가 직접 추가한 쇼핑몰(마이그레이션 009, 코드 custom_…) — 이름은 DB(perf_marketplaces.name)."""
|
|
|
|
def __init__(self, code: str) -> None:
|
|
self.code = code
|