refactor: the invoice and subscription flow of user
This commit is contained in:
@@ -5,7 +5,7 @@ import { Column, Entity, ManyToOne } from "typeorm";
|
||||
import { Invoice } from "./invoice.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { DecimalTransformer } from "../../../common/transformers/decimal.transformer";
|
||||
import { SubscriptionPlan } from "../../subscriptions/entities/subscription.entity";
|
||||
import { UserSubscription } from "../../subscriptions/entities/user-subscription.entity";
|
||||
|
||||
@Entity()
|
||||
export class InvoiceItem extends BaseEntity {
|
||||
@@ -27,6 +27,6 @@ export class InvoiceItem extends BaseEntity {
|
||||
@Column({ type: "decimal", precision: 16, scale: 2, nullable: false, transformer: new DecimalTransformer() })
|
||||
totalPrice: Decimal;
|
||||
|
||||
@ManyToOne(() => SubscriptionPlan, { nullable: true, onDelete: "RESTRICT" })
|
||||
subscriptionPlan: SubscriptionPlan | null;
|
||||
@ManyToOne(() => UserSubscription, { nullable: true, onDelete: "RESTRICT" })
|
||||
subscriptionPlan: UserSubscription | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user