import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsNumber, IsOptional } from 'class-validator';

export class PublishCouponDto {
  @ApiPropertyOptional({
    example: 50,
    description:
      'Points required to claim this coupon in rewards marketplace. (Stored as cashiCoinsCost internally for backward compatibility.)',
  })
  @IsOptional()
  @IsNumber()
  cashiPointsCost?: number;

  @ApiPropertyOptional({
    example: 50,
    description: '[Deprecated alias] Use cashiPointsCost',
  })
  @IsOptional()
  @IsNumber()
  cashiCoinsCost?: number;
}

