All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 26s
- 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
96 lines
2.3 KiB
C#
96 lines
2.3 KiB
C#
namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
|
||
|
||
/// <summary>
|
||
/// 网关路由实体 - 表示全局路由规则配置
|
||
/// </summary>
|
||
public class GwRoute
|
||
{
|
||
public string Id { get; set; } = Guid.CreateVersion7().ToString("N");
|
||
|
||
|
||
/// <summary>
|
||
/// 服务名称
|
||
/// </summary>
|
||
public string ServiceName { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 集群ID
|
||
/// </summary>
|
||
public string ClusterId { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 路由匹配配置(JSON 列存储)
|
||
/// </summary>
|
||
public GwRouteMatch Match { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 优先级(对应 YARP Order,数值越小优先级越高)
|
||
/// </summary>
|
||
public int Priority { get; set; } = 0;
|
||
|
||
/// <summary>
|
||
/// 路由级别负载均衡策略覆盖(可选,默认使用集群策略)
|
||
/// </summary>
|
||
public GwLoadBalancingPolicy? LoadBalancingPolicy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 授权策略名称
|
||
/// </summary>
|
||
public string? AuthorizationPolicy { get; set; }
|
||
|
||
/// <summary>
|
||
/// CORS 策略名称
|
||
/// </summary>
|
||
public string? CorsPolicy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 限流策略名称
|
||
/// </summary>
|
||
public string? RateLimiterPolicy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 请求/响应转换规则(JSON 列存储)
|
||
/// </summary>
|
||
public List<GwTransform>? Transforms { get; set; }
|
||
|
||
/// <summary>
|
||
/// 请求超时时间(秒)
|
||
/// </summary>
|
||
public int? TimeoutSeconds { get; set; }
|
||
|
||
/// <summary>
|
||
/// 状态
|
||
/// </summary>
|
||
public int Status { get; set; } = 1;
|
||
|
||
|
||
/// <summary>
|
||
/// 创建人ID
|
||
/// </summary>
|
||
public long? CreatedBy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 创建时间
|
||
/// </summary>
|
||
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
|
||
|
||
/// <summary>
|
||
/// 更新人ID
|
||
/// </summary>
|
||
public long? UpdatedBy { get; set; }
|
||
|
||
/// <summary>
|
||
/// 更新时间
|
||
/// </summary>
|
||
public DateTime? UpdatedTime { get; set; }
|
||
|
||
/// <summary>
|
||
/// 是否删除
|
||
/// </summary>
|
||
public bool IsDeleted { get; set; } = false;
|
||
|
||
/// <summary>
|
||
/// 版本号,用于乐观并发
|
||
/// </summary>
|
||
public int Version { get; set; } = 0;
|
||
} |