52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Fitness_core_BE.DTOs.Facility
|
|
{
|
|
public class CreateFacilityRequest
|
|
{
|
|
[Required]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
/// <summary>"Gym" | "Pool" | "Court" | "Class".</summary>
|
|
[Required]
|
|
public string FacilityType { get; set; } = "Class";
|
|
|
|
public string? Description { get; set; }
|
|
|
|
[Range(1, int.MaxValue, ErrorMessage = "DefaultCapacity must be at least 1")]
|
|
public int DefaultCapacity { get; set; } = 1;
|
|
}
|
|
|
|
public class UpdateFacilityRequest
|
|
{
|
|
[Required]
|
|
public Guid FacilityId { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? FacilityType { get; set; }
|
|
public string? Description { get; set; }
|
|
public int? DefaultCapacity { 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; }
|
|
|
|
/// <summary>Overrides the facility's default capacity for this specific session.</summary>
|
|
public int? Capacity { get; set; }
|
|
}
|
|
}
|