feat(notification): add Resend quota gate and waiting-for-reset state

This commit is contained in:
shira committed 2026-10-06 11:50:38 +03:00
1 parent 3b917befa9
commit b856d4ff54
40 files changed
+4116 -48

No files matched your search

@@ -79,6 +79,30 @@ type EmailToken struct {
InvalidatedAt pgtype.Timestamptz
}
type MailQuotaReservation struct {
ID pgtype.UUID
DeliveryID pgtype.UUID
Provider string
ProviderAccount string
DayStart pgtype.Date
MonthStart pgtype.Date
Recipients int64
ReservedAt pgtype.Timestamptz
ReleasedAt pgtype.Timestamptz
SettledOutcome pgtype.Text
SettledAt pgtype.Timestamptz
}
type MailQuotaUsage struct {
Provider string
ProviderAccount string
PeriodKind string
PeriodStart pgtype.Date
UsedRecipients int64
ProviderExhaustedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type MailRequest struct {
ID pgtype.UUID
RecipientUserID pgtype.UUID