Utopia-Canteen-System/Models/EmployeeRfidTagCache.cs

44 lines
1.8 KiB
C#

namespace UtopiaCanteenSystem.Models;
/// <summary>
/// Local SQLite cache of production <c>hrms.employee_rfid_tag</c>, plus denormalized employee/department
/// fields populated during sync for offline RFID lookup.
/// </summary>
public class EmployeeRfidTagCache
{
public int LocalId { get; set; }
/// <summary>Production <c>employee_rfid_tag.id</c>.</summary>
public long HrmsId { get; set; }
public string ManufacturerSerial { get; set; } = string.Empty;
public string UindSerial { get; set; } = string.Empty;
public string Secret { get; set; } = string.Empty;
public string ParentDocumentType { get; set; } = string.Empty;
public string ParentDocumentId { get; set; } = string.Empty;
public DateTime? DateTimeCreated { get; set; }
public string CreatedBy { get; set; } = string.Empty;
public int? GradeId { get; set; }
public string GradeType { get; set; } = string.Empty;
public int? ShiftId { get; set; }
public string LocationSiteId { get; set; } = string.Empty;
public string RfidLocationSiteId { get; set; } = string.Empty;
public int FunctionId { get; set; }
public int DepartmentId { get; set; }
public string ReportingManagerIds { get; set; } = string.Empty;
/// <summary><c>employee.serial_number</c> from sync join.</summary>
public string EmployeeSerialNumber { get; set; } = string.Empty;
/// <summary><c>employee.concatenated_name</c> from sync join.</summary>
public string EmployeeConcatenatedName { get; set; } = string.Empty;
/// <summary><c>department.title</c> from sync join.</summary>
public string DepartmentTitle { get; set; } = string.Empty;
/// <summary><c>department.department_type</c> from sync join.</summary>
public string DepartmentType { get; set; } = string.Empty;
public DateTime LastSyncedAtUtc { get; set; }
}