Utopia-Canteen-System/Services/IMealSessionResolver.cs

24 lines
831 B
C#

using UtopiaCanteenSystem.Models;
namespace UtopiaCanteenSystem.Services;
/// <summary>
/// Resolves current meal session from DB-driven schedule (Phase 2.5). Replaces hardcoded time windows.
/// </summary>
public interface IMealSessionResolver
{
/// <summary>True when local <c>meal_schedule_cache</c> has at least one row.</summary>
bool IsScheduleCacheAvailable();
/// <summary>True when local menu cache tables have data.</summary>
bool IsMenuCacheAvailable();
/// <summary>True when both schedule and menu caches are populated.</summary>
bool IsOfflineMealDataAvailable();
/// <summary>
/// Returns the active meal session for the given local time and site, or null if outside all windows.
/// </summary>
ResolvedMealSession? GetCurrentSession(DateTime nowLocal, string siteId);
}