Utopia-Canteen-System/Services/IMenuLookupService.cs

25 lines
1.1 KiB
C#

using UtopiaCanteenSystem.Models;
namespace UtopiaCanteenSystem.Services;
/// <summary>
/// Fetches lunch menu items from local SQLite cache by site (synced from HRMS).
/// Uses same HRMS connection as employee lookup.
/// </summary>
public interface IMenuLookupService
{
/// <summary>
/// Gets menu items (item_name, item_type) for the given site for the current week.
/// siteIdNumeric: match to lunch_menu_week.location_site_id (e.g. 2 for site "02").
/// </summary>
Task<IReadOnlyList<HrmsMenuItem>> GetMenuItemsForSiteAsync(int siteIdNumeric, CancellationToken cancellationToken = default);
/// <summary>
/// Gets menu items for the given site and specific local date (yyyy-MM-dd).
/// Avoids server time mismatch by not relying on CURDATE().
/// </summary>
//Task<IReadOnlyList<HrmsMenuItem>> GetMenuItemsForSiteAndDateAsync(int siteIdNumeric, DateTime menuDateLocal, CancellationToken cancellationToken = default);
Task<IReadOnlyList<HrmsMenuItem>> GetMenuItemsForSiteAndDateAsync(int siteIdNumeric, DateTime menuDateLocal, string gradeType, string mealName ,CancellationToken cancellationToken = default);
}