• erio's avatar
    feat(account): add daily/weekly periodic quota limits for API Key accounts · 1ee17383
    erio authored
    
    
    Extend the existing total quota limit with daily and weekly periodic
    dimensions. Each dimension is independently configurable and uses lazy
    reset — when the period expires, usage is automatically reset to zero on
    the next increment. Any dimension exceeding its limit will pause the
    account from scheduling.
    
    Backend:
    - Add GetQuotaDailyLimit/Used, GetQuotaWeeklyLimit/Used, HasAnyQuotaLimit
    - Rewrite IncrementQuotaUsed with atomic CTE SQL for 3-dimension update
    - Rewrite ResetQuotaUsed to clear all dimensions and period timestamps
    - Update postUsageBilling to use HasAnyQuotaLimit()
    - Preserve daily/weekly used values on account edit
    
    Frontend:
    - Refactor QuotaLimitCard from single v-model to 3-dimension props
    - Add QuotaBadge component for compact D/W/$ display
    - Update AccountCapacityCell with per-dimension badges
    - Update Create/Edit modals with daily/weekly quota fields
    - Update AccountActionMenu hasQuotaLimit to check all dimensions
    - Add i18n strings for daily/weekly/total quota labels
    Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
    1ee17383
account.go 36.5 KB