Skip to content

refactor: rename plan to regular_plan in subscription models - #1806

Open
Rakanhf wants to merge 1 commit into
QF-8766_Add-trialplan-and-trialexpiresat-to-subscription-modelfrom
QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model
Open

refactor: rename plan to regular_plan in subscription models#1806
Rakanhf wants to merge 1 commit into
QF-8766_Add-trialplan-and-trialexpiresat-to-subscription-modelfrom
QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model

Conversation

@Rakanhf

@Rakanhf Rakanhf commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Moving towards reducing complexity of the subscription models and preparing for single trial subscription record This change will help to simplify managing trial subscriptions

  • Renamed plan to regular_plan in subscription models and adjusted related code
  • Added plan property to Subscription model to return the current plan (either regular_plan or trial_plan)
  • Added active_plan to CurrentSubscription view model to return the current plan (either regular_plan or trial_plan) which will make it easier to filter on joins
  • Adjusted tests accordingly to the field rename

@duke-nyuki

Copy link
Copy Markdown
Collaborator

@Rakanhf
Rakanhf force-pushed the QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model branch from b02277b to 357cafc Compare August 27, 2026 16:22
@Rakanhf
Rakanhf force-pushed the QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model branch from 357cafc to 33ac5a3 Compare August 28, 2026 09:40
@Rakanhf
Rakanhf force-pushed the QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model branch 2 times, most recently from 4d44e49 to 0e4319d Compare August 28, 2026 12:51
Moving towards reducing complexity of the subscription models and preparing for single trial subscription record
This change will help to simplify managing trial subscriptions

- Renamed `plan` to `regular_plan` in subscription models and adjusted related code
- Added `plan` property to `Subscription` model to return the current plan (either `regular_plan` or `trial_plan`)
- Added `active_plan` to `CurrentSubscription` view model to return the current plan (either `regular_plan` or `trial_plan`) which will make it easier to filter on joins
- Adjusted tests accordingly to the field rename
@Rakanhf
Rakanhf force-pushed the QF-8765_Refactor-plan-to-regularplan-field-on-subscription-model branch from 0e4319d to 2d63d7f Compare August 31, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants