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


export class StartCrawlDto {
  @ApiProperty({ example: 'https://cyberalertnepal.com', description: 'Base URL to start crawling from' })
  @IsNotEmpty()
  @IsString()
  @IsUrl({ protocols: ['http', 'https'], require_protocol: true })
  url: string;

  @ApiProperty({ example: 1, description: 'Maximum crawl depth', required: false, default: 1 })
  maxDepth?: number = 2;

  @ApiProperty({ example: 500, description: 'Maximum number of URLs to crawl', required: false, default: 500 })
  maxUrls?: number = 500;
}
