chore: user financial
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
// eslint-disable-next-line import/no-named-as-default
|
||||
import Decimal from "decimal.js";
|
||||
import { Column, Entity, JoinTable, ManyToMany } from "typeorm";
|
||||
import { Column, Entity, ManyToOne } from "typeorm";
|
||||
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { DecimalTransformer } from "../../../common/transformers/decimal.transformer";
|
||||
import { DanakService } from "../../danak-services/entities/danak-service.entity";
|
||||
import { SubscriptionPlan } from "../../subscriptions/entities/subscription.entity";
|
||||
import { DiscountCalculationType, DiscountType } from "../enums/discount-type.enum";
|
||||
|
||||
@Entity()
|
||||
@@ -32,7 +33,6 @@ export class Discount extends BaseEntity {
|
||||
@Column({ type: "timestamptz" })
|
||||
endDate: Date;
|
||||
|
||||
@ManyToMany(() => DanakService, (danakService) => danakService.discounts, { nullable: true })
|
||||
@JoinTable()
|
||||
services?: DanakService[];
|
||||
@ManyToOne(() => SubscriptionPlan, { nullable: true, onDelete: "SET NULL" })
|
||||
subscriptionPlan: SubscriptionPlan;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user