using Baya.Application.Models.Booking;
using Baya.Application.Models.Common;
using Mediator;

namespace Baya.Application.Features.Bookings.Commands.CancelBooking;

/// <summary>Cancels a whole booking: resolves the applicable cancellation policy by lead time + actor,
/// freezes its <c>code</c> + <c>refund_percentage</c> onto the booking, marks every un-started session
/// cancelled, and moves the booking to <c>cancelled</c>. Only un-started (still <c>scheduled</c>) sessions are
/// refundable. No refund ledger is posted — that is b11. The booking id comes from the route.</summary>
public record CancelBookingCommand(string Reason, long BookingId = 0)
    : IRequest<OperationResult<CancellationResultDto>>;
