using System.ComponentModel.DataAnnotations; namespace Fitness_core_BE.DTOs.Facility { public class CustomOccurrenceRequest { [Required] public DateTime StartTime { get; set; } [Required, Range(1, int.MaxValue, ErrorMessage = "DurationMinutes must be at least 1")] public int DurationMinutes { get; set; } } public class CreateFacilityClassRequest { [Required] public Guid FacilityId { get; set; } [Required] public string Name { get; set; } = string.Empty; public string? Description { get; set; } /// "Daily" | "Weekly" | "Monthly" | "Custom". [Required] public string RecurrenceType { get; set; } = "Weekly"; /// "HH:mm" local time -- required unless RecurrenceType == "Custom". public string? StartTimeOfDay { get; set; } [Range(1, int.MaxValue, ErrorMessage = "DurationMinutes must be at least 1")] public int DurationMinutes { get; set; } = 60; /// Weekly only. Bit flags, Sunday = 1 through Saturday = 64. public int WeekDaysMask { get; set; } /// Monthly only. Comma-separated day-of-month list, e.g. "1,15". public string? MonthDays { get; set; } public DateTime? SeriesStartDate { get; set; } public DateTime? SeriesEndDate { get; set; } public int? Capacity { get; set; } public bool IsUnlimitedCapacity { get; set; } /// RecurrenceType == "Custom" only -- explicit occurrence windows. public List? CustomOccurrences { get; set; } } public class UpdateFacilityClassRequest { public string? Name { get; set; } public string? Description { get; set; } public string? RecurrenceType { get; set; } public string? StartTimeOfDay { get; set; } public int? DurationMinutes { get; set; } public int? WeekDaysMask { get; set; } public string? MonthDays { get; set; } public DateTime? SeriesStartDate { get; set; } public DateTime? SeriesEndDate { get; set; } public int? Capacity { get; set; } public bool? IsUnlimitedCapacity { get; set; } public bool? IsActive { get; set; } /// RecurrenceType == "Custom" only -- adds more explicit occurrences without /// touching existing ones (Custom has no rule to regenerate from). public List? AddCustomOccurrences { get; set; } } public class MarkNotHeldRequest { public string? Reason { get; set; } } }