using FrameworkDAL.DTO.EIPConversation; using GB5Shared.DTO.Framework.Login; using System; using System.Threading; using System.Threading.Tasks; namespace FrameworkDAL.CustomCode.EIPConversation.EIPSession { public interface IEIPSessionDAL { /// /// Returns the active session for the given user+tenant+channel combination, /// or null if none exists or the session has expired (>30 min idle). /// Task GetActiveSessionAsync( string userIdentifier, int tenantId, int channelType, LoginDTO login, CancellationToken ct = default); /// /// Creates or updates the active session row (MERGE). /// Returns the SESSIONID GUID (existing row's ID on update, newly generated on insert). /// Task UpsertSessionAsync( EIPUserSessionDTO session, LoginDTO login, CancellationToken ct = default); /// /// Marks the active session as expired (STATUS=0). /// Call when the flow reaches an END step. /// Task ExpireSessionAsync( string userIdentifier, int tenantId, int channelType, LoginDTO login, CancellationToken ct = default); } }