feat(subscriptions): implement subscription quota enforcement
- Apply QuotaGuard + @RequireQuota to listing creation and analytics endpoints - Add QuotaExceeded domain event emitted when quota is exceeded - Create ListingCreatedUsageHandler to auto-meter usage on listing creation - Create QuotaExceededListener to send email notifications on quota exceeded - Add maxAnalyticsQueries and maxMediaUploads fields to Plan model - Add quota.exceeded email notification template - Define quota limits per plan tier in seed data - Add 15 unit tests covering guard, event handler, listener, and event Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -423,9 +423,11 @@ model Plan {
|
||||
name String
|
||||
priceMonthlyVND BigInt
|
||||
priceYearlyVND BigInt
|
||||
maxListings Int?
|
||||
maxSavedSearches Int?
|
||||
features Json
|
||||
maxListings Int?
|
||||
maxSavedSearches Int?
|
||||
maxAnalyticsQueries Int?
|
||||
maxMediaUploads Int?
|
||||
features Json
|
||||
isActive Boolean @default(true)
|
||||
|
||||
subscriptions Subscription[]
|
||||
|
||||
Reference in New Issue
Block a user