Private
Public Access
forked from FOSS/AutoShop-Djimbo-Simple
feat(referral): add referral system with withdrawals
This commit is contained in:
@@ -97,6 +97,11 @@ class Settings:
|
||||
misc_profit_week: int
|
||||
misc_profit_month: int
|
||||
|
||||
# Реферальная система
|
||||
referral_refill_percent: float
|
||||
status_referral: str
|
||||
referral_bonus_rub: float
|
||||
|
||||
|
||||
@dataclass
|
||||
class User:
|
||||
@@ -110,3 +115,40 @@ class User:
|
||||
user_refill: float
|
||||
user_give: float
|
||||
user_unix: int
|
||||
|
||||
# Поля для реферальной системы
|
||||
user_referrer_id: Optional[int]
|
||||
user_referral_balance: float
|
||||
user_referral_hold: float
|
||||
|
||||
|
||||
@dataclass
|
||||
class Referral:
|
||||
increment: int
|
||||
referrer_id: int
|
||||
referral_id: int
|
||||
referral_unix: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class ReferralTransaction:
|
||||
increment: int
|
||||
user_id: int
|
||||
related_user_id: Optional[int]
|
||||
transaction_type: str
|
||||
source_id: str
|
||||
amount: float
|
||||
transaction_unix: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class ReferralWithdrawal:
|
||||
increment: int
|
||||
user_id: int
|
||||
withdrawal_amount: float
|
||||
withdrawal_method: str
|
||||
withdrawal_recipient: str
|
||||
withdrawal_status: str
|
||||
withdrawal_unix: int
|
||||
processed_unix: Optional[int]
|
||||
processed_admin_id: Optional[int]
|
||||
|
||||
Reference in New Issue
Block a user