26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using UtopiaCanteenSystem.Models;
|
|
|
|
namespace UtopiaCanteenSystem.Services;
|
|
|
|
/// <summary>
|
|
/// Looks up employee info from local HRMS MySQL by RFID (manufacturer_serial).
|
|
/// Uses a separate connection from production sync.
|
|
/// </summary>
|
|
public interface IEmployeeLookupService
|
|
{
|
|
/// <summary>
|
|
/// Finds employee by RFID. Returns null if card is not registered in HRMS.
|
|
/// </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);
|
|
}
|