namespace Fitness_core_BE.DTOs.Facility { public class FacilityDto { public Guid FacilityId { get; set; } public string Name { get; set; } = string.Empty; public bool SupportsClasses { get; set; } public bool SupportsBooking { get; set; } public string? Description { get; set; } public int DefaultCapacity { get; set; } public int NumberOfUnits { get; set; } public decimal PricePerHour { get; set; } public bool IsActive { get; set; } public DateTime CreatedAt { get; set; } // Absorbed from the old PlaceDto -- at most one for now, see AccessDevice.FKFacilityId. public Guid? DeviceId { get; set; } public string? DeviceName { get; set; } } public class FacilitySessionDto { public Guid FacilitySessionId { get; set; } public Guid FacilityId { get; set; } public string? FacilityName { get; set; } public DateTime StartTime { get; set; } public DateTime EndTime { get; set; } public int Capacity { get; set; } /// When true, Capacity above is meaningless -- this occurrence has no cap. public bool IsUnlimitedCapacity { get; set; } public int BookedCount { get; set; } public bool IsCancelled { get; set; } /// Null for a manually-created session; set for a class occurrence. public Guid? FacilityClassId { get; set; } public string? FacilityClassName { get; set; } public string? NotHeldReason { get; set; } public DateTime? NotHeldAt { get; set; } } /// GET api/client/facilities/availability -- how much room is left for a requested /// window. A facility can support both booking and classes at once, so the two number pairs /// are independently nullable: null means "this facility doesn't offer that mode," not zero. /// BookingUnitsFree is forced to 0 when an active (non-cancelled) class occupies the window -- /// a running class occupies the whole facility, not just a seat. public class FacilityAvailabilityDto { public Guid FacilityId { get; set; } public string FacilityName { get; set; } = string.Empty; public bool SupportsClasses { get; set; } public bool SupportsBooking { get; set; } public int? BookingTotalUnits { get; set; } public int? BookingUnitsFree { get; set; } public int? ClassTotalCapacity { get; set; } public int? ClassUnitsFree { get; set; } /// True when an overlapping class occurrence has no headcount cap -- when set, /// ClassTotalCapacity/ClassUnitsFree stay null (unbounded, not zero). public bool ClassIsUnlimitedCapacity { get; set; } public decimal PricePerHour { get; set; } } }