namespace UtopiaCanteenSystem.Models; /// /// Represents a single RFID scan event. Used for local storage and sync. /// public class ScanRecord { public int Id { get; set; } /// RFID card identifier at time of scan. public string CardId { get; set; } = string.Empty; /// UTC time when the scan occurred. public DateTime ScanTime { get; set; } /// True after record has been successfully sent / synced. public bool IsSynced { get; set; } /// Site identifier where the scan occurred (2-digit string, e.g. "02"). public string SiteId { get; set; } = string.Empty; /// Stable device identifier that generated the scan (from config). public string DeviceId { get; set; } = string.Empty; /// IP address of the device at scan time. public string IpAddress { get; set; } = string.Empty; /// Meal session enum value at scan time (int cast of MealSession). public int MealSessionCode { get; set; } /// HRMS employee document id (employee.id) at scan time; used to load photo from hrms.employee_photo. public string ParentDocumentId { get; set; } = string.Empty; /// HRMS employee ID (serial_number) at scan time, when lookup succeeded. public string EmployeeId { get; set; } = string.Empty; /// uind_serial from employee_rfid_tag at scan time. public string UindSerial { get; set; } = string.Empty; /// function_id from employee_rfid_tag at scan time. public int FunctionId { get; set; } /// department_id from employee_rfid_tag at scan time. public int DepartmentId { get; set; } /// date_time_created from employee_rfid_tag (stored as DateTime; naming kept for clarity). public DateTime? TagCreatedAtUtc { get; set; } /// created_by from employee_rfid_tag. public string TagCreatedBy { get; set; } = string.Empty; /// Full name (first + middle) from HRMS at scan time, when lookup succeeded. public string EmployeeName { get; set; } = string.Empty; /// HRMS department title at scan time. public string Department { get; set; } = string.Empty; /// HRMS department type at scan time. public string DepartmentType { get; set; } = string.Empty; /// Meal/session label at scan time (e.g. Breakfast/Lunch/Tea/Dinner). public string MealLabel { get; set; } = string.Empty; /// Menu items string for this scan's meal (e.g. "Biryani + Nihari"). public string MealItems { get; set; } = string.Empty; /// Total price for this scan's meal menu. public double TotalPrice { get; set; } }