using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Fitness_core_BE.Models { /// Many-to-many join: which Facility(ies) a CustomerPlan grants access to. A plan /// with no rows here is unrestricted (reaches every active device) -- see /// AccessDeviceService's allowed-device resolution. NOTE: this access-scoping is stored and /// surfaced in the UI but not actually enforced by provisioning today -- a pre-existing gap, /// unrelated to the Facility/Place rename, left exactly as unenforced as it was when this /// table was named CustomerPlanPlace. public class CustomerPlanFacility { [Key] public Guid CustomerPlanFacilityId { get; set; } public Guid FKCustomerPlanId { get; set; } [ForeignKey(nameof(FKCustomerPlanId))] public CustomerPlan CustomerPlan { get; set; } = null!; public Guid FKFacilityId { get; set; } [ForeignKey(nameof(FKFacilityId))] public Facility Facility { get; set; } = null!; } }