import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsIn, IsOptional, IsUUID } from 'class-validator';

export class GetEligibleBookingsDto {
  @ApiPropertyOptional({ enum: ['CONTAINER', 'BULK'] })
  @IsOptional()
  @IsIn(['CONTAINER', 'BULK'])
  freightType?: 'CONTAINER' | 'BULK';

  @ApiPropertyOptional({ format: 'uuid' })
  @IsOptional()
  @IsUUID()
  originStationId?: string;

  @ApiPropertyOptional({ format: 'uuid' })
  @IsOptional()
  @IsUUID()
  destinationStationId?: string;

  @ApiPropertyOptional({
    format: 'uuid',
    description: 'Scope to bookings that targeted this specific schedule (batch parity).',
  })
  @IsOptional()
  @IsUUID()
  trainScheduleId?: string;

  @ApiPropertyOptional()
  @IsOptional()
  schedulingStatus?: string;
}
