import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsString, IsArray, IsOptional } from 'class-validator';

export class HoldSeatsDto {
  @ApiProperty({ example: 'schedule-uuid' }) @IsString() scheduleId: string;
  @ApiProperty({ example: ['seat_1', 'seat_2'] }) @IsArray() @IsString({ each: true }) seatIds: string[];
  @ApiProperty({ example: 'passenger-uuid' }) @IsString() passengerId: string;
  @ApiProperty({ example: 'st_ADD' }) @IsString() originStationId: string;
  @ApiProperty({ example: 'st_DJI' }) @IsString() destinationStationId: string;
  @ApiPropertyOptional({ example: 'quote-uuid' }) @IsOptional() @IsString() fareQuoteId?: string;
}

export class ConfirmBookingDto {
  @ApiProperty({ example: 'hold-uuid' }) @IsString() holdId: string;
  @ApiProperty({ example: 'booking-uuid' }) @IsString() bookingId: string;
}

export class SeatAvailabilityDto {
  @ApiProperty({ example: 'schedule-uuid' }) @IsString() scheduleId: string;
  @ApiProperty({ example: 'st_ADD' }) @IsString() originStationId: string;
  @ApiProperty({ example: 'st_DJI' }) @IsString() destinationStationId: string;
}

export class ReleaseSeatsDto {
  @ApiProperty({ example: 'schedule-uuid' }) @IsString() scheduleId: string;
  @ApiProperty({ example: 'st_DJI' }) @IsString() currentStationId: string;
}
