feat: add RESET_TRAFFIC_ON_TARIFF_SWITCH admin setting
New boolean setting (default: True) controls whether user traffic is reset when switching between tariff plans. Changes: - config.py: add RESET_TRAFFIC_ON_TARIFF_SWITCH setting - system_settings_service.py: category override (TRAFFIC) + hints - pricing.py: admin bot handler toggle entry - cabinet/routes/subscription.py: pass reset_traffic to RemnaWave on switch - webapi/routes/miniapp.py: same for miniapp tariff switch - tariff_purchase.py: use setting in 3 switch handlers (was hardcoded) - subscription_auto_purchase_service.py: separate tariff switch vs payment logic - crud/subscription.py: conditional traffic_used_gb reset on tariff change
This commit is contained in:
@@ -134,6 +134,7 @@ class Settings(BaseSettings):
|
||||
DEFAULT_DEVICE_LIMIT: int = 1
|
||||
DEFAULT_TRAFFIC_RESET_STRATEGY: str = 'MONTH'
|
||||
RESET_TRAFFIC_ON_PAYMENT: bool = False
|
||||
RESET_TRAFFIC_ON_TARIFF_SWITCH: bool = True
|
||||
MAX_DEVICES_LIMIT: int = 20
|
||||
|
||||
TRIAL_WARNING_HOURS: int = 2
|
||||
|
||||
Reference in New Issue
Block a user