namespace TakeoutSaaS.Module.Tenancy;

/// <summary>
/// 租户编码解析器：根据租户编码查询租户 ID。
/// </summary>
public interface ITenantCodeResolver
{
    /// <summary>
    /// 根据租户编码查询租户 ID。
    /// </summary>
    /// <param name="code">租户编码。</param>
    /// <param name="cancellationToken">取消令牌。</param>
    /// <returns>租户 ID，未找到返回 null。</returns>
    Task<long?> ResolveAsync(string code, CancellationToken cancellationToken = default);
}
