import { IsNotEmpty, IsOptional, IsNumber, IsString } from "class-validator"
import { ApiProperty } from "@nestjs/swagger"

export class TripPricingDto {
  @ApiProperty({ example: 10, description: "ID of the trip" })
  @IsNotEmpty({ message: "Please select a valid trip." })
  @IsNumber({}, { message: "Please select a valid trip." })
  trip_id: number

  @ApiProperty({ example: 1, description: "ID of the vehicle type" })
  @IsNotEmpty({ message: "Please select a valid vehicle type." })
  @IsNumber({}, { message: "Please select a valid vehicle type." })
  vehicle_type_id: number

  @ApiProperty({ example: 2, description: "ID of the trip type" })
  @IsNotEmpty({ message: "Please select a valid trip type." })
  @IsNumber({}, { message: "Please select a valid trip type." })
  trip_type_id: number

  @ApiProperty({
    example: "150.00",
    description: "Base price for the vehicle type",
  })
  @IsNotEmpty({ message: "Please enter a valid vehicle type price." })
  @IsString({ message: "Please enter a valid vehicle type price." })
  vehicle_type_price: string

  @ApiProperty({
    example: "150.00",
    description: "total price for the vehicle type",
  })
  @IsNotEmpty({ message: "Please enter a valid vehicle total price." })
  @IsString({ message: "Please enter a valid vehicle total price." })
  vehicle_total_price: string

  @ApiProperty({
    example: 3,
    required: false,
    description: "ID of meet and greet add-on (optional)",
  })
  @IsOptional()
  @IsNumber({}, { message: "Please select a valid meet and greet." })
  meet_greet_id?: number

  @ApiProperty({
    example: "50.00",
    required: false,
    description: "Price for meet and greet add-on (optional)",
  })
  @IsOptional()
  @IsString({ message: "Please enter a valid meet and greet price." })
  meet_greet_price?: string
}
