Add account self-delete and subscription lifecycle sync (#34)
Soft-delete DELETE /api/user/ for authenticated users (hide conversations, blacklist tokens, block staff self-delete). Sync Stripe portal cancel/change via subscription.updated/deleted webhooks and expose cancel_at_period_end for Account UI (chat_web_app#75 companion).
This commit is contained in:
@@ -149,6 +149,15 @@ class UserSubscription(TimeInfoBase):
|
||||
default="",
|
||||
db_index=True,
|
||||
)
|
||||
cancel_at_period_end = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Stripe: subscription will cancel at current_period_end.",
|
||||
)
|
||||
current_period_end = models.DateTimeField(
|
||||
null=True,
|
||||
blank=True,
|
||||
help_text="Stripe billing period end (access remains until then when canceling).",
|
||||
)
|
||||
monthly_token_quota_override = models.PositiveIntegerField(
|
||||
null=True,
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user