Initial commit: AutonetSellCar platform with deployment system
- Frontend: Next.js 14 with TypeScript - Backend: FastAPI with SQLAlchemy - Agent: Carmodoo sync agent - Deployment: Docker Compose based staging/production setup - Scripts: Automated deployment with rollback support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
41
backend/app/schemas/referral.py
Normal file
41
backend/app/schemas/referral.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class ReferralRewardResponse(BaseModel):
|
||||
"""레퍼럴 보상 응답 스키마"""
|
||||
id: int
|
||||
referrer_id: int
|
||||
referred_user_id: int
|
||||
payment_amount: float
|
||||
reward_amount: float
|
||||
status: str
|
||||
created_at: datetime
|
||||
credited_at: Optional[datetime] = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class ReferralStats(BaseModel):
|
||||
"""레퍼럴 통계 스키마"""
|
||||
total_referrals: int # 총 추천한 회원 수
|
||||
total_rewards_earned: float # 총 보상 금액
|
||||
total_rewards_credited: float # 적립된 보상 금액
|
||||
total_rewards_pending: float # 대기 중인 보상 금액
|
||||
available_for_withdrawal: float # 출금 가능 금액
|
||||
|
||||
|
||||
class ReferralSettingsResponse(BaseModel):
|
||||
"""레퍼럴 설정 응답 스키마"""
|
||||
referral_reward_enabled: bool
|
||||
referral_reward_percent: float
|
||||
referral_reward_type: str # one_time / recurring
|
||||
|
||||
|
||||
class ReferralSettingsUpdate(BaseModel):
|
||||
"""레퍼럴 설정 업데이트 스키마"""
|
||||
referral_reward_enabled: Optional[bool] = None
|
||||
referral_reward_percent: Optional[float] = None
|
||||
referral_reward_type: Optional[str] = None
|
||||
Reference in New Issue
Block a user