AddFirstBookingDiscount
This commit is contained in:
@@ -127,4 +127,56 @@ export class UpdateBusinessDto {
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
tipsEnabled?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: true,
|
||||
description: 'When true, a promotional percentage discount is active for this business',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
promoDiscountEnabled?: boolean;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 'اولین رزرو شما',
|
||||
nullable: true,
|
||||
description: 'Display title for the promo (owner-defined)',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
promoDiscountTitle?: string | null;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 10,
|
||||
nullable: true,
|
||||
description: 'Discount percent (1–100)',
|
||||
minimum: 1,
|
||||
maximum: 100,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(100)
|
||||
promoDiscountPercent?: number | null;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 'NEW10',
|
||||
nullable: true,
|
||||
description: 'Display code shown to customers (auto-applied when eligible)',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(40)
|
||||
promoDiscountCode?: string | null;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: 'first_booking',
|
||||
enum: ['first_booking', 'always'],
|
||||
description:
|
||||
'first_booking = only the customer’s first booking at this business; always = every booking while enabled',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^(first_booking|always)$/)
|
||||
promoDiscountMode?: 'first_booking' | 'always';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user