import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional } from 'class-validator';

export class CalculateDiscountDto {
  @ApiProperty()
  @IsNotEmpty()
  code: string;

  @ApiProperty()
  @IsNotEmpty()
  isService: boolean;

  @ApiProperty()
  @IsOptional()
  orderTotal: number;

  @ApiProperty()
  @IsOptional()
  totalWage: number;

  @ApiProperty()
  @IsNotEmpty()
  runValidations: boolean;
}
