AddFirstBookingDiscount
This commit is contained in:
@@ -66,6 +66,25 @@ export class BusinessEntity {
|
||||
@Column({ default: false })
|
||||
tipsEnabled!: boolean;
|
||||
|
||||
/** Owner-defined promotional percentage discount. */
|
||||
@Column({ default: false })
|
||||
promoDiscountEnabled!: boolean;
|
||||
|
||||
/** Banner / receipt title, e.g. "اولین رزرو شما" or "تخفیف ویژه تابستان". */
|
||||
@Column({ type: 'varchar', nullable: true, length: 150 })
|
||||
promoDiscountTitle!: string | null;
|
||||
|
||||
@Column({ type: 'int', nullable: true })
|
||||
promoDiscountPercent!: number | null;
|
||||
|
||||
/** Display code on landing (auto-applied; not a separate redeem step). */
|
||||
@Column({ type: 'varchar', nullable: true, length: 40 })
|
||||
promoDiscountCode!: string | null;
|
||||
|
||||
/** `first_booking` = only first booking of customer at this business; `always` = every booking while enabled. */
|
||||
@Column({ type: 'varchar', length: 20, default: 'first_booking' })
|
||||
promoDiscountMode!: 'first_booking' | 'always';
|
||||
|
||||
@ManyToOne(() => BusinessCategoryEntity, (category) => category.businesses, {
|
||||
onDelete: 'RESTRICT',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user