26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using UtopiaCanteenSystem.Models;
|
|
|
|
namespace UtopiaCanteenSystem.Services;
|
|
|
|
/// <summary>
|
|
/// Employee lookup by RFID from local SQLite cache; menu authorization may still use HRMS.
|
|
/// </summary>
|
|
public interface IEmployeeLookupService
|
|
{
|
|
/// <summary>
|
|
/// Finds employee by RFID (<c>manufacturer_serial</c>) in local <c>employee_rfid_tag_cache</c>.
|
|
/// Returns null if the card is not in the cache (sync from HRMS first).
|
|
/// </summary>
|
|
Task<HrmsEmployeeInfo?> GetEmployeeByRfidAsync(string rfid, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Reads <c>employee.location_site_id</c> where <c>employee.serial_number</c> matches the login employee id. Null if missing or not configured.
|
|
/// </summary>
|
|
Task<string?> GetLocationSiteIdByEmployeeSerialAsync(string employeeSerial, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// Validates that a menu item is authorized for the employee RFID via <c>employee_menu_item_tag</c>.
|
|
/// </summary>
|
|
Task<bool> IsMenuItemAuthorizedForRfidAsync(string rfid, int menuItemId, CancellationToken cancellationToken = default);
|
|
}
|