using Microsoft.AspNetCore.Identity;

using Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;

namespace Fengling.Platform.Infrastructure;

/// <summary>
/// 路由管理器接口
/// </summary>
public interface IRouteManager
{
    Task<GwTenantRoute?> FindByIdAsync(long? id, CancellationToken cancellationToken = default);
    Task<GwTenantRoute?> FindByTenantCodeAsync(string tenantCode, CancellationToken cancellationToken = default);
    Task<IList<GwTenantRoute>> GetAllAsync(CancellationToken cancellationToken = default);
    Task<IdentityResult> CreateRouteAsync(GwTenantRoute route, CancellationToken cancellationToken = default);
    Task<IdentityResult> UpdateRouteAsync(GwTenantRoute route, CancellationToken cancellationToken = default);
    Task<IdentityResult> DeleteRouteAsync(GwTenantRoute route, CancellationToken cancellationToken = default);
}
