Refactor CustomerPlanService to use FacilityRepository, remove PlaceService, and introduce RfidTagService

- Updated CustomerPlanService to replace references to PlaceRepo with FacilityRepository for managing customer plans and associated facilities.
- Removed PlaceService and its related methods, consolidating functionality into FacilityService.
- Added RfidTagService for managing RFID tags, including methods for creating, updating, and setting statuses of tags.
- Updated TenantDbContext to include new DbSet for RfidTags and CustomerPlanFacilities, and adjusted model configurations accordingly.
- Enhanced FacilityService to support new booking modes and validation for facility creation and updates.
This commit is contained in:
2026-09-29 13:02:52 +05:30
parent bffc9b1686
commit 7d8a8478ff
39 changed files with 1596 additions and 678 deletions
+25
View File
@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
/// <summary>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.</summary>
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!;
}
}