package com.mvrent.carrental.web;

import com.mvrent.carrental.model.RentalUnit;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/** Payload for an admin-created (counter / phone) booking. */
public record AdminBookingForm(
        Long customerId,
        // walk-in customer details (used when customerId is null)
        String customerName,
        String customerPhone,
        String customerEmail,
        Long carId,
        boolean withDriver,
        Long driverId,
        RentalUnit rentalUnit,
        @JsonFormat(pattern = "yyyy-MM-dd")
        @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate pickupDate,
        @JsonFormat(pattern = "yyyy-MM-dd")
        @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate returnDate,
        String pickupLocation,
        String dropLocation
) {}
