feat: add support plan features and user support plan functionality
This commit is contained in:
@@ -173,6 +173,15 @@ export class SupportPlansService {
|
||||
|
||||
return { userSupportPlan };
|
||||
}
|
||||
|
||||
//***************************************** */
|
||||
async getUsersOfSupportPlan(supportPlanId: string) {
|
||||
const users = await this.userSupportPlanRepo.find({
|
||||
where: { supportPlan: { id: supportPlanId }, status: UserSupportPlanStatus.ACTIVE },
|
||||
relations: { user: true, supportPlan: true },
|
||||
});
|
||||
return users;
|
||||
}
|
||||
//***************************************** */
|
||||
async upgradeSupportPlan(newPlanId: string, userId: string) {
|
||||
const queryRunner = this.dataSource.createQueryRunner();
|
||||
|
||||
Reference in New Issue
Block a user