feat: add support plan features and user support plan functionality
This commit is contained in:
@@ -30,7 +30,13 @@ export class SupportPlanRepository extends Repository<SupportPlan> {
|
||||
}
|
||||
|
||||
async getSupportPlansListUser() {
|
||||
return this.find({ where: { isActive: true, deletedAt: IsNull() }, order: { price: "ASC" }, relations: { features: true } });
|
||||
return this.createQueryBuilder("supportPlan")
|
||||
.leftJoinAndSelect("supportPlan.features", "features")
|
||||
.where("supportPlan.isActive = :isActive", { isActive: true })
|
||||
.andWhere("supportPlan.deletedAt IS NULL")
|
||||
.orderBy("supportPlan.price", "ASC")
|
||||
.addOrderBy("features.featureKey", "ASC")
|
||||
.getMany();
|
||||
}
|
||||
//***************************************** */
|
||||
async getSupportPlanById(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user