using System.ComponentModel.DataAnnotations; namespace Fitness_core_BE.DTOs.Facility { public class CreateFacilityRequest { [Required] public string Name { get; set; } = string.Empty; /// At least one of SupportsClasses/SupportsBooking must be true. public bool SupportsClasses { get; set; } = true; public bool SupportsBooking { get; set; } = false; public string? Description { get; set; } /// Required (meaningfully) when SupportsClasses. [Range(1, int.MaxValue, ErrorMessage = "DefaultCapacity must be at least 1")] public int DefaultCapacity { get; set; } = 1; /// Required (meaningfully) when SupportsBooking -- 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 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 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; } } }