feat(notify): add percentage threshold type for balance low notification

- Add threshold_type field (fixed/percentage) to system and user settings
- Add total_recharged field to users table, auto-incremented on balance credit
- Percentage mode: effective threshold = total_recharged × percentage / 100
- User-level threshold_type inherits from system default when not set
- Update admin settings UI with radio selector (fixed amount / percentage)
- Migration: 102_add_balance_notify_threshold_type.sql
This commit is contained in:
erio
2026-04-12 13:53:02 +08:00
parent d0674e0ff9
commit f694afbbf4
27 changed files with 838 additions and 74 deletions

View File

@@ -4797,8 +4797,12 @@ export default {
title: '余额不足提醒',
description: '当用户余额低于阈值时发送邮件提醒',
enabled: '启用余额不足提醒',
threshold: '默认提醒阈值',
thresholdType: '阈值类型',
typeFixed: '固定金额',
typePercentage: '充值百分比',
threshold: '提醒阈值',
thresholdHint: '用户未自定义时使用此值',
percentageHint: '当余额低于累计充值额的此百分比时提醒',
thresholdPlaceholder: '输入金额',
},
quotaNotify: {