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
+7 -7
View File
@@ -37,13 +37,13 @@ namespace Fitness_core_BE.Models
[MaxLength(160)]
public string? HardwareId { get; set; }
// Which Place (physical zone) this terminal sits in. Null = unscoped: reachable by
// every plan regardless of that plan's Places (keeps pre-existing devices and
// plans without any place restriction working unchanged). Unique when set --
// exactly one device per place for now (see Models/Place.cs).
public Guid? FKPlaceId { get; set; }
[ForeignKey(nameof(FKPlaceId))]
public Place? Place { get; set; }
// Which Facility (physical zone) this terminal sits in. Null = unscoped: reachable by
// every plan regardless of that plan's Facilities (keeps pre-existing devices and
// plans without any facility restriction working unchanged). Unique when set --
// exactly one device per facility for now (see Models/Facility.cs).
public Guid? FKFacilityId { get; set; }
[ForeignKey(nameof(FKFacilityId))]
public Facility? Facility { get; set; }
public bool IsActive { get; set; } = true;
public DateTime? LastSeenAt { get; set; }