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

export class AiBookingRequestDto {
  @ApiProperty({
    description: 'Free-text customer booking request to extract fields from',
    example:
      'Book 2x40ft containers from Djibouti to Indode. Cargo electronics. Customer ABC Logistics.',
    minLength: 5,
  })
  @IsString()
  @IsNotEmpty({ message: 'text must not be empty' })
  @MinLength(5, { message: 'text must be at least 5 characters' })
  text!: string;
}
