#nullable enable
using Baya.Application.Models.Booking;
using Baya.Application.Models.Common;
using Mediator;

namespace Baya.Application.Features.Booking.Commands.CreateBookingRequest;

/// <summary>
/// A customer requests a specific nurse for a patient, service variant, address, date and time, with a
/// required caregiver gender and optional stage-1 <c>customer_notes</c>. The customer is derived from the
/// caller, never the body. The handler enforces the tenancy invariant (patient + address ∈ caller,
/// variant ∈ nurse), the same-gender match, bookability, and freezes the response deadline from config.
/// No money and no booking are created — only a <c>pending_nurse_response</c> request.
/// </summary>
public record CreateBookingRequestCommand(
    long NurseId,
    long VariantId,
    long PatientId,
    long CustomerAddressId,
    DateOnly RequestedDate,
    TimeOnly RequestedTimeStart,
    TimeOnly RequestedTimeEnd,
    string RequiredCaregiverGender,
    string? CustomerNotes) : IRequest<OperationResult<BookingRequestDto>>;
