import { ApiProperty } from '@nestjs/swagger';
import { IsISO8601 } from 'class-validator';

/**
 * Reschedule a train's departure date (staff action on the ops board). Only
 * allowed before the booking window opens; the new date must still leave room
 * for the booking lead window before departure.
 */
export class UpdateScheduleDateDto {
  @ApiProperty({
    example: '2026-07-20T05:00:00.000Z',
    description: 'New scheduled departure date/time (ISO 8601)',
  })
  @IsISO8601()
  scheduleDate!: string;
}
