using System.ComponentModel.DataAnnotations; namespace Fitness_core_BE.DTOs.Facility { public class CreateFacilityRequest { [Required] public string Name { get; set; } = string.Empty; /// "Scheduled" | "AdHoc". [Required] public string BookingMode { get; set; } = "Scheduled"; public string? Description { get; set; } /// Required (meaningfully) when BookingMode == "Scheduled". [Range(1, int.MaxValue, ErrorMessage = "DefaultCapacity must be at least 1")] public int DefaultCapacity { get; set; } = 1; /// Required (meaningfully) when BookingMode == "AdHoc" -- e.g. 3 for "3 courts". [Range(1, int.MaxValue, ErrorMessage = "NumberOfUnits must be at least 1")] public int NumberOfUnits { get; set; } = 1; [Range(typeof(decimal), "0", "79228162514264337593543950335", ErrorMessage = "PricePerHour cannot be negative")] public decimal PricePerHour { get; set; } = 0m; } public class UpdateFacilityRequest { [Required] public Guid FacilityId { get; set; } public string? Name { get; set; } public string? BookingMode { 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 class SetFacilityStatusRequest { [Required] public bool IsActive { get; set; } } public class CreateFacilitySessionRequest { [Required] public Guid FacilityId { get; set; } [Required] public DateTime StartTime { get; set; } [Required] public DateTime EndTime { get; set; } /// Overrides the facility's default capacity for this specific session. public int? Capacity { get; set; } } /// Absorbed from the old AssignPlaceDeviceRequest. public class AssignFacilityDeviceRequest { // Null unassigns the facility's current device. public Guid? DeviceId { get; set; } } public class GetFacilityAvailabilityRequest { public Guid? FacilityId { get; set; } [Required] public DateTime StartTime { get; set; } [Required, Range(1, int.MaxValue, ErrorMessage = "DurationMinutes must be at least 1")] public int DurationMinutes { get; set; } } }