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

export class CreatePromotionDto {
  @ApiProperty({ example: 'Weekend Special' }) @IsString() title: string;
  @ApiPropertyOptional({ example: '15% off all routes' }) @IsOptional() @IsString() subtitle?: string;
  @ApiProperty({ example: 'WEEKEND15' }) @IsString() code: string;
  @ApiPropertyOptional({ example: 15 }) @IsOptional() @IsInt() percentOff?: number;
  @ApiPropertyOptional({ example: 5000 }) @IsOptional() @IsInt() amountOffMinor?: number;
  @ApiProperty({ example: '2026-12-31T23:59:59Z' }) @IsString() validUntil: string;
  @ApiPropertyOptional({ example: 'Book Now' }) @IsOptional() @IsString() ctaLabel?: string;
  @ApiPropertyOptional({ example: 'edr://search' }) @IsOptional() @IsString() deepLink?: string;
}
