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

export class ScanResultDto {
  @ApiProperty({ description: 'Unique identifier of the scan' })
  id: number;

  @ApiProperty({ description: 'URL that was scanned' })
  url: string;

  @ApiProperty({ description: 'Timestamp of the scan' })
  scanDate: Date;

  @ApiProperty({ description: 'Overall scan status' })
  status: string;

  @ApiProperty({ description: 'Detailed scan results' })
  results: any;
}



export class ScanWebsiteDto {
  @ApiProperty({
    description: 'URL to be scanned',
    example: 'https://nabinyadav1.com.np',
  })
  @IsUrl({}, { message: 'Invalid URL format' })
  @IsNotEmpty({ message: 'URL cannot be empty' })
  url: string;
}
