update: add target service to the announement get by id for admin
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Column, Entity, OneToMany } from "typeorm";
|
||||
import { Column, DeleteDateColumn, Entity, OneToMany } from "typeorm";
|
||||
|
||||
import { DiscountService } from "./discount-product.entity";
|
||||
import { UsageDiscount } from "./usage-discount.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { DecimalTransformer } from "../../../common/transformers/decimal.transformer";
|
||||
@@ -32,18 +31,9 @@ export class Discount extends BaseEntity {
|
||||
@Column({ type: "boolean", default: true })
|
||||
isActive: boolean;
|
||||
|
||||
@Column({ type: "boolean", default: false })
|
||||
direct: boolean;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
maxUsage: number;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
maxUsagePerUser: number;
|
||||
|
||||
@OneToMany(() => DiscountService, (discountService) => discountService.discount, { cascade: true })
|
||||
discountServices: DiscountService[];
|
||||
|
||||
@OneToMany(() => UsageDiscount, (usageDiscount) => usageDiscount.discount)
|
||||
usages: UsageDiscount[];
|
||||
|
||||
@DeleteDateColumn({ nullable: true })
|
||||
deletedAt?: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user