Files
Core_Be/DTOs/Booking/BookingDto.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

53 lines
2.2 KiB
C#

namespace Fitness_core_BE.DTOs.Booking
{
public class BookingDto
{
public Guid BookingId { get; set; }
/// <summary>Null for an AdHoc booking (no pre-created session).</summary>
public Guid? FacilitySessionId { get; set; }
public Guid FacilityId { get; set; }
public string? FacilityName { get; set; }
/// <summary>"Scheduled" | "AdHoc" -- read off the facility, tells the FE which action set
/// applies (e.g. AdHoc bookings can be rescheduled to any free time; Scheduled ones only
/// to another session).</summary>
public string BookingMode { get; set; } = string.Empty;
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
/// <summary>Informational headcount, AdHoc only.</summary>
public int? PartySize { get; set; }
public bool IsGuest { get; set; }
public Guid? CustomerId { get; set; }
public string? GuestName { get; set; }
public string? GuestPhone { get; set; }
/// <summary>Only populated in the response right after booking creation -- the
/// guest's receipt. Never returned by list/lookup endpoints afterward.</summary>
public string? OtpCode { get; set; }
public bool OtpVerified { get; set; }
public Guid? RfidTagId { get; set; }
public string? RfidTagLabel { get; set; }
public DateTime? RfidAssignedAt { get; set; }
public DateTime? RfidReturnedAt { get; set; }
public string PaymentStatus { get; set; } = string.Empty;
public decimal AmountCharged { get; set; }
/// <summary>"Cash" | "Bank". Null until PaymentStatus becomes "Paid".</summary>
public string? PaymentMethod { get; set; }
public DateTime? PaidAt { get; set; }
public string Status { get; set; } = string.Empty;
public DateTime BookedAt { get; set; }
public DateTime? CheckedInAt { get; set; }
public DateTime? CheckedOutAt { get; set; }
/// <summary>A public, unauthenticated link to this booking's confirmation page --
/// copy-paste-and-share receipt. Works for both member and guest bookings.</summary>
public string? ShareUrl { get; set; }
}
}