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
+44
View File
@@ -0,0 +1,44 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
/// <summary>
/// Maps one tenant access profile to one physical terminal user record.
/// DeviceEmployeeNo is the terminal's person identifier, not a fingerprint template.
/// </summary>
public class AccessDeviceBinding
{
[Key]
public Guid AccessDeviceBindingId { get; set; }
public long FKAccessProfileId { get; set; }
[ForeignKey(nameof(FKAccessProfileId))]
public AccessProfile AccessProfile { get; set; } = null!;
public Guid FKDeviceId { get; set; }
[ForeignKey(nameof(FKDeviceId))]
public AccessDevice AccessDevice { get; set; } = null!;
[MaxLength(32)]
public string DeviceEmployeeNo { get; set; } = string.Empty;
[MaxLength(20)]
public string ProvisionStatus { get; set; } = "Pending";
[MaxLength(20)]
public string ActualAccessState { get; set; } = "Unknown";
public int FingerprintCount { get; set; }
[MaxLength(128)]
public string? DeviceReportedName { get; set; }
[MaxLength(1000)]
public string? LastError { get; set; }
public DateTime? LastSyncedAt { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
}