chore: add create customer and update customer for admin

This commit is contained in:
mahyargdz
2025-03-06 09:35:59 +03:30
parent c1f21e75f2
commit b92a65c22c
20 changed files with 674 additions and 399 deletions
@@ -13,10 +13,10 @@ export class UserSubscription extends BaseEntity {
@ManyToOne(() => SubscriptionPlan, (plan) => plan.userSubscriptions, { nullable: false, onDelete: "CASCADE" })
plan: SubscriptionPlan;
@Column({ type: "timestamp", nullable: false })
@Column({ type: "timestamptz", nullable: false })
startDate: Date;
@Column({ type: "timestamp", nullable: false })
@Column({ type: "timestamptz", nullable: false })
endDate: Date;
@Column({ type: "varchar", length: 250, nullable: false })
@@ -142,8 +142,8 @@ export class SubscriptionsService {
.createQueryBuilder("subscription")
.leftJoin("subscription.service", "service")
.addSelect(["service.id"])
.leftJoin("subscription.discounts", "discount")
.addSelect(["discount.calculationType", "discount.amount", "discount.startDate", "discount.endDate", "discount.isActive"])
// .leftJoin("subscription.discounts", "discount")
// .addSelect(["discount.calculationType", "discount.amount", "discount.startDate", "discount.endDate", "discount.isActive"])
.where("service.id = :serviceId", { serviceId });
if (queryDto.q) {