Files
Core_Be/Interfaces/Services/IBookingService.cs
T
HarithaRandunu 51f0021e27 feat: Enhance booking functionality with invoice management and dashboard summary
- Added customerId to guest booking requests for better identification.
- Implemented new endpoints for managing booking invoices and dashboard summaries.
- Created BookingInvoice and BookingDashboardSummary DTOs to support new features.
- Updated Booking and BookingInvoice models to include payment method and timestamps.
- Enhanced BookingService to handle invoice creation upon payment confirmation.
- Modified BookingRepository to support CRUD operations for BookingInvoice.
- Updated TenantDbContext to include BookingInvoice DbSet and relevant configurations.
- Improved error handling and validation for booking completion and payment processes.
2026-10-01 03:46:03 +05:30

70 lines
3.9 KiB
C#

using Microsoft.AspNetCore.Http;
namespace Fitness_core_BE.Interfaces.Services
{
public interface IBookingService
{
/// <summary>Logged-in member books a session against their own plan's allowance.</summary>
Task<object> CreateMemberBooking(object payload, HttpContext httpContext);
/// <summary>No membership at all -- pay-per-session, identity proof is the returned OTP.</summary>
Task<object> CreateGuestBooking(object payload, HttpContext httpContext);
/// <summary>Member books an AdHoc-mode facility directly for an arbitrary time window, no
/// pre-created session.</summary>
Task<object> CreateMemberAdhocBooking(object payload, HttpContext httpContext);
/// <summary>Guest/staff walk-in books an AdHoc-mode facility directly.</summary>
Task<object> CreateGuestAdhocBooking(object payload, HttpContext httpContext);
/// <summary>Renders the public, unauthenticated confirmation page a booking's ShareUrl
/// points to -- the "copy the link and share it" receipt. Returns null if not found, so
/// the controller can render a 404 page instead of a JSON error for a browser hit.</summary>
Task<object?> GetBookingView(object payload);
/// <summary>Staff records a guest booking's payment (cash/bank/at-venue) after the fact.</summary>
Task<object> MarkGuestBookingPaid(object payload, HttpContext httpContext);
/// <summary>Staff/door check-in: verifies the OTP, optionally assigns an RFID tag, marks
/// the booking checked in. Also lazily sweeps this client's overdue bookings first (see
/// BookingService.SweepOverdueBookingsAsync) instead of a background job.</summary>
Task<object> CheckInBooking(object payload, HttpContext httpContext);
Task<object> CancelBooking(object payload, HttpContext httpContext);
/// <summary>Staff hands a Confirmed guest booking to a different person (name/phone) --
/// no cancel/recreate needed. Guest bookings only.</summary>
Task<object> ReassignBooking(object payload, HttpContext httpContext);
/// <summary>Staff moves a Confirmed booking to a different time (AdHoc) or session
/// (Scheduled), only onto a slot with room.</summary>
Task<object> RescheduleBooking(object payload, HttpContext httpContext);
/// <summary>Staff manually flags a Confirmed, never-arrived booking.</summary>
Task<object> MarkNoShow(object payload, HttpContext httpContext);
/// <summary>Staff checks out a CheckedIn booking, releasing its RFID tag if any. A guest
/// booking still Unpaid must confirm payment in this same call -- see
/// BookingService.CompleteBooking. Also lazily sweeps this client's overdue Confirmed
/// bookings to NoShow first, same as CheckInBooking.</summary>
Task<object> CompleteBooking(object payload, HttpContext httpContext);
Task<object> GetMyBookings(object payload, HttpContext httpContext);
Task<object> GetSessionBookings(object payload, HttpContext httpContext);
/// <summary>Unified roster covering both booking modes.</summary>
Task<object> GetBookings(object payload, HttpContext httpContext);
/// <summary>Receipts generated whenever a booking's payment is recorded -- their own
/// "Invoices" tab, separate from the membership-based Customer Payments view.</summary>
Task<object> GetBookingInvoices(object payload, HttpContext httpContext);
/// <summary>Renders the public, unauthenticated receipt page a BookingInvoice's ShareUrl
/// points to. Returns null if not found.</summary>
Task<object?> GetBookingInvoiceView(object payload);
/// <summary>Stat-card summary for the Bookings page's Dashboard tab.</summary>
Task<object> GetBookingDashboardSummary(object payload, HttpContext httpContext);
}
}