feat: implement support plan subscription functionality
This commit is contained in:
@@ -5,7 +5,7 @@ import { Invoice } from "./invoice.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { DecimalTransformer } from "../../../common/transformers/decimal.transformer";
|
||||
import { UserSubscription } from "../../subscriptions/entities/user-subscription.entity";
|
||||
|
||||
import { UserSupportPlan } from "../../support-plans/entities/user-support-plan.entity";
|
||||
@Entity()
|
||||
export class InvoiceItem extends BaseEntity {
|
||||
@ManyToOne(() => Invoice, (invoice) => invoice.items, { onDelete: "CASCADE" })
|
||||
@@ -28,4 +28,7 @@ export class InvoiceItem extends BaseEntity {
|
||||
|
||||
@ManyToOne(() => UserSubscription, { nullable: true, onDelete: "RESTRICT" })
|
||||
subscriptionPlan: UserSubscription | null;
|
||||
|
||||
@ManyToOne(() => UserSupportPlan, { nullable: true, onDelete: "RESTRICT" })
|
||||
supportPlan: UserSupportPlan | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user