d7c29c0883
- rewards: 激励视频实发改按 calculate_ad_reward_coin(eCPM, 当日第N次) 公式;AD_REWARD_COIN/MAX_AD_REWARD_COIN 降为历史兼容口径;新增 SIGNIN_BOOST_COIN=2000 - 签到膨胀: Day1-13 看完激励视频额外发固定金币、Day14 不允许 (signin.py / signin-boost) - ad_session_id 幂等: ad_ecpm/ad_reward/ad_feed_reward 记录加 ad_session_id 列 + 唯一索引(新迁移 coin_reward_phase2 / ad_feed_reward_session) - ad.py + schemas + repositories: ecpm-report / feed-reward / reward-status / test-grant 改造;config_schema 增 signin_boost_coin;admin stats overview 补充 - 同步 docs/api + docs/database + docs/integrations/pangle 及 tests(test_ad_reward / test_welfare) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: OuYingJun1024 <1034284404@qq.com> Reviewed-on: #28 Co-authored-by: ouzhou <ouzhou@wonderable.ai> Co-committed-by: ouzhou <ouzhou@wonderable.ai>
57 lines
1.2 KiB
Python
57 lines
1.2 KiB
Python
"""admin 大盘 schemas(对应 stats.dashboard_overview 的嵌套结构)。"""
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DashboardUsers(BaseModel):
|
|
total: int
|
|
active: int
|
|
disabled: int
|
|
deleted: int
|
|
new_today: int
|
|
dau: int
|
|
|
|
|
|
class DashboardCoins(BaseModel):
|
|
reward_video_coin_total: int = 0
|
|
reward_video_watch_count: int = 0
|
|
feed_ad_coin_total: int = 0
|
|
feed_ad_watch_count: int = 0
|
|
signin_coin_total: int = 0
|
|
signin_count: int = 0
|
|
signin_boost_coin_total: int = 0
|
|
signin_boost_watch_count: int = 0
|
|
granted_total: int
|
|
|
|
|
|
class DashboardCash(BaseModel):
|
|
withdraw_success_cents: int
|
|
withdraw_pending_count: int
|
|
withdraw_success_count: int
|
|
withdraw_failed_count: int
|
|
|
|
|
|
class DashboardComparison(BaseModel):
|
|
total: int
|
|
success: int
|
|
success_rate: float
|
|
|
|
|
|
class DashboardFeedback(BaseModel):
|
|
new: int
|
|
|
|
|
|
class DashboardCps(BaseModel):
|
|
available: bool
|
|
note: str
|
|
|
|
|
|
class DashboardOverview(BaseModel):
|
|
users: DashboardUsers
|
|
coins: DashboardCoins
|
|
cash: DashboardCash
|
|
comparison: DashboardComparison
|
|
feedback: DashboardFeedback
|
|
cps: DashboardCps
|