Skip to content

Commit 7940732

Browse files
committed
feat: add future plan and renewal uuids to summary model
1 parent c046e01 commit 7940732

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

enterprise_access/apps/customer_billing/admin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,17 @@ class StripeEventSummaryAdmin(DjangoQLSearchMixin, admin.ModelAdmin):
311311
'created',
312312
'checkout_intent_id',
313313
'subscription_plan_uuid',
314+
'future_subscription_plan_uuid',
315+
'subscription_plan_renewal_uuid',
314316
]
315317
list_filter = [
316318
'event_type',
317319
]
318320
search_fields = [
319321
'event_id',
322+
'subscription_plan_uuid',
323+
'future_subscription_plan_uuid',
324+
'subscription_plan_renewal_uuid',
320325
]
321326
select_related = [
322327
'checkout_intent',
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 4.2.25 on 2025-10-30 13:33
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('customer_billing', '0016_alter_checkoutintent_uuid_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='stripeeventsummary',
15+
name='future_subscription_plan_uuid',
16+
field=models.UUIDField(blank=True, db_index=True, help_text='UUID of the future SubscriptionPlan from License Manager', null=True),
17+
),
18+
migrations.AddField(
19+
model_name='stripeeventsummary',
20+
name='subscription_plan_renewal_uuid',
21+
field=models.UUIDField(blank=True, db_index=True, help_text='UUID of the SubscriptionPlanRenewal from License Manager, which relates the (current) plan to the future plan', null=True),
22+
),
23+
]

enterprise_access/apps/customer_billing/models.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,21 @@ class StripeEventSummary(TimeStampedModel):
661661
db_index=True,
662662
help_text='UUID of the SubscriptionPlan from License Manager'
663663
)
664+
future_subscription_plan_uuid = models.UUIDField(
665+
null=True,
666+
blank=True,
667+
db_index=True,
668+
help_text='UUID of the future SubscriptionPlan from License Manager'
669+
)
670+
subscription_plan_renewal_uuid = models.UUIDField(
671+
null=True,
672+
blank=True,
673+
db_index=True,
674+
help_text=(
675+
'UUID of the SubscriptionPlanRenewal from License Manager, '
676+
'which relates the (current) plan to the future plan'
677+
),
678+
)
664679

665680
# Stripe object identification
666681
stripe_object_type = models.CharField(

0 commit comments

Comments
 (0)