feat(라이브): 방송 창에 Fee·커미션 자동 계산, 광고비·호스트 비용 입력, 방송 장소 뺌
- Fee = 시간 x RM25, 커미션 = 판매금액 x 10% (저장 안 함, 이미지에서 매출을 읽으면 다시 계산) - 광고비·호스트 비용(수기) = 방송마다 저장 (마이그레이션 live_db_006_broadcast_fees.sql) - 달력 날짜 광고비 = 그날 방송 광고비 합, 호스트 비용 = host_fee 합 (날짜별 광고비 입력 버튼·/live/ad-spend 없앰) - 방송 장소는 창·표에서 뺌 (예전 값은 DB 에 그대로) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,13 +36,10 @@ class Fake:
|
||||
return []
|
||||
# 운영 화면처럼 — 6·8·16시 칸에 카드(세 줄 모두 카드가 있으면 그 줄이 가장 높다), 모든 시간 칸을 채워 높이 최악으로
|
||||
return [{"id": h, "host_id": 1, "host_name": "Nabella", "tiktok_handle": "MainAccount", "broadcast_date": date(2026, 11, 5), "start_time": time(h),
|
||||
"end_time": time(h + 2), "venue": "", "sales_amount": Decimal("500"),
|
||||
"end_time": time(h + 2), "venue": "", "sales_amount": Decimal("500"), "ad_spend": Decimal("100"), "host_fee": Decimal("50"),
|
||||
"images": [{"id": 7, "filename": "r.png"}, {"id": 8, "filename": "s.png"}] if h == 6 else []} for h in range(6, 24, 2) if h < 22] + \
|
||||
[{"id": 22, "host_id": 1, "host_name": "Nabella", "tiktok_handle": "MainAccount", "broadcast_date": date(2026, 11, 5), "start_time": time(22),
|
||||
"end_time": time(23, 30), "venue": "", "sales_amount": Decimal("500"), "images": []}]
|
||||
|
||||
def ad_spends(self, start, end):
|
||||
return {}
|
||||
"end_time": time(23, 30), "venue": "", "sales_amount": Decimal("500"), "ad_spend": None, "host_fee": None, "images": []}]
|
||||
|
||||
def broadcast_days(self, start, end):
|
||||
return ["2026-10-30", "2026-11-05", "2026-11-20", "2026-12-03"] # 오른쪽 달력 점 — 다른 달 날짜도
|
||||
|
||||
Reference in New Issue
Block a user