import { IsString, IsEnum, IsUUID, IsOptional, IsBoolean, MaxLength } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateScheduleDto {
  @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' })
  @IsUUID()
  wipe_profile_id: string;

  @ApiProperty({ example: 'Weekly Thursday Wipe', maxLength: 100 })
  @IsString()
  @MaxLength(100)
  schedule_name: string;

  @ApiProperty({ example: 'map', enum: ['map', 'blueprint', 'full'] })
  @IsEnum(['map', 'blueprint', 'full'])
  wipe_type: 'map' | 'blueprint' | 'full';

  @ApiProperty({ example: '0 14 * * 4', description: 'Cron expression for schedule' })
  @IsString()
  @MaxLength(100)
  cron_expression: string;

  @ApiPropertyOptional({ example: 'America/New_York', default: 'America/New_York' })
  @IsOptional()
  @IsString()
  @MaxLength(50)
  timezone?: string;

  @ApiPropertyOptional({ example: false, default: false })
  @IsOptional()
  @IsBoolean()
  wipe_blueprints?: boolean;
}
