#nullable enable
namespace Baya.Application.Models.Booking;

/// <summary>
/// The repository's role-agnostic detail projection for a single request. It carries both parties' ids so
/// the handler can authorize the caller and decide visibility, plus the full (decrypted) address fields so
/// the handler can surface them to the owning customer/admin and <b>mask</b> them for the nurse. The
/// handler maps this to the public <see cref="BookingRequestDto"/>; the encrypted fields never leave the
/// customer/admin path.
/// </summary>
public record BookingRequestDetailProjection(
    long Id,
    string Status,
    long CustomerId,
    long NurseId,
    string NurseName,
    decimal NurseRating,
    int NurseTotalReviews,
    long PatientId,
    string PatientName,
    long VariantId,
    string VariantLabel,
    string VariantPriceUnit,
    long CustomerAddressId,
    string AddressTitle,
    long CityId,
    string CityNameFa,
    string CityNameEn,
    long? DistrictId,
    string? DistrictNameFa,
    string? DistrictNameEn,
    string? AddressLine,
    string? PostalCode,
    string? RecipientName,
    string? RecipientPhone,
    string? RequiredCaregiverGender,
    DateOnly RequestedDate,
    TimeOnly RequestedTimeStart,
    TimeOnly RequestedTimeEnd,
    string? CustomerNotes,
    DateTime NurseResponseDeadlineAt,
    DateTime? PaymentDeadlineAt,
    string? NurseRejectionReason,
    DateTimeOffset CreatedAt,
    long VariantPrice,
    string? NurseAvatarUrl,
    long? BookingId);
