Files
Core_Be/Models/UnlinkedDeviceEnrollment.cs
T
Dhananjaya99 bffc9b1686 first commit
2026-09-28 11:44:26 +05:30

37 lines
1.4 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models
{
// A fingerprint enrolled directly on the physical access-control terminal (by gym
// staff, outside our system) that has no matching CustomerAccess yet. Surfaced by
// attendance ingestion (AgentService.IngestAttendanceAsync) whenever an incoming
// employeeNo/DeviceUserId has no CustomerAccess mapping for that device, so the
// client portal can offer it in a dropdown to link to a system Customer.
public class UnlinkedDeviceEnrollment
{
[Key]
public Guid Id { get; set; }
public Guid FKDeviceId { get; set; }
[ForeignKey("FKDeviceId")]
public virtual AccessDevice AccessDevice { get; set; }
public int DeviceUserId { get; set; }
[MaxLength(32)]
public string DeviceEmployeeNo { get; set; } = string.Empty;
public string? DeviceReportedName { get; set; }
[MaxLength(20)]
public string? DeviceUserType { get; set; }
public int FingerprintCount { get; set; }
public DateTime DiscoveredAt { get; set; } = DateTime.UtcNow;
public DateTime LastSeenAt { get; set; } = DateTime.UtcNow;
public DateTime? LinkedAt { get; set; }
public long? FKAccessProfileId { get; set; }
[ForeignKey(nameof(FKAccessProfileId))]
public virtual AccessProfile? AccessProfile { get; set; }
}
}