first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:44:26 +05:30
parent 721743ae6b
commit bffc9b1686
424 changed files with 46474 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
/// <summary>One scheduled, bookable occurrence of a Facility (e.g. "Pool, Tue 6-7pm").
/// Capacity is enforced by counting non-cancelled Bookings against this row, not by a
/// denormalized counter, to avoid drift between the two.</summary>
public class FacilitySession
{
[Key]
public Guid FacilitySessionId { get; set; }
public Guid FKFacilityId { get; set; }
[ForeignKey(nameof(FKFacilityId))]
public Facility Facility { get; set; }
public Guid FKClientId { get; set; }
[ForeignKey(nameof(FKClientId))]
public Client Client { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
/// <summary>Overrides Facility.DefaultCapacity when set; null = use the facility default.</summary>
public int? Capacity { get; set; }
public bool IsCancelled { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public virtual ICollection<Booking> Bookings { get; set; }
}
}