fengling-platform/Fengling.Platform.Infrastructure/IRouteStore.cs
Kimi CLI b66b231917
All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 26s
refactor: replace GwTenantRoute with GwRoute, change Id type to string
- Remove GwTenantRoute (old tenant-specific route entity)
- Add GwRoute with string Id (Guid.CreateVersion7)
- Update IRouteManager and IRouteStore interfaces
- Update PlatformDbContext configuration for new schema
- GwRoute is now global, tenant-specific routing moved to GwDestination.TenantCode

BREAKING CHANGE: Database schema change requires table recreation
2026-03-08 15:21:43 +08:00

23 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Identity;
using Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
namespace Fengling.Platform.Infrastructure;
/// <summary>
/// 路由存储接口
/// </summary>
public interface IRouteStore
{
Task<GwRoute?> FindByIdAsync(string? id, CancellationToken cancellationToken = default);
Task<GwRoute?> FindByClusterIdAsync(string clusterId, CancellationToken cancellationToken = default);
Task<IList<GwRoute>> GetAllAsync(CancellationToken cancellationToken = default);
Task<IList<GwRoute>> GetPagedAsync(int page, int pageSize,
string? serviceName = null, RouteStatus? status = null, CancellationToken cancellationToken = default);
Task<int> GetCountAsync(string? serviceName = null,
RouteStatus? status = null, CancellationToken cancellationToken = default);
Task<IdentityResult> CreateAsync(GwRoute route, CancellationToken cancellationToken = default);
Task<IdentityResult> UpdateAsync(GwRoute route, CancellationToken cancellationToken = default);
Task<IdentityResult> DeleteAsync(GwRoute route, CancellationToken cancellationToken = default);
}