feat(03-gateway-route-update): extend GwTenantRoute and delete obsolete entities
- Add Methods, Hosts, Headers, LoadBalancingPolicy, AuthorizationPolicy, CorsPolicy, Transforms fields to GwTenantRoute - Delete GwTenant entity (use Platform.Tenant instead) - Delete GwServiceInstance entity (use GwCluster embedded Destination)
This commit is contained in:
parent
0699863b24
commit
3fbd9d07a6
@ -1,69 +0,0 @@
|
|||||||
namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 网关服务实例实体 - 表示负载均衡的服务实例
|
|
||||||
/// </summary>
|
|
||||||
public class GwServiceInstance
|
|
||||||
{
|
|
||||||
public string Id { get; set; } = Guid.CreateVersion7().ToString("N");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 集群ID
|
|
||||||
/// </summary>
|
|
||||||
public string ClusterId { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 目标ID
|
|
||||||
/// </summary>
|
|
||||||
public string DestinationId { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 地址
|
|
||||||
/// </summary>
|
|
||||||
public string Address { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 健康状态
|
|
||||||
/// </summary>
|
|
||||||
public int Health { get; set; } = 1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 权重
|
|
||||||
/// </summary>
|
|
||||||
public int Weight { get; set; } = 1;
|
|
||||||
|
|
||||||
/// <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;
|
|
||||||
}
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 网关租户实体 - 表示租户在网关中的配置
|
|
||||||
/// </summary>
|
|
||||||
public class GwTenant
|
|
||||||
{
|
|
||||||
public long Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 租户代码
|
|
||||||
/// </summary>
|
|
||||||
public string TenantCode { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 租户名称
|
|
||||||
/// </summary>
|
|
||||||
public string TenantName { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <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;
|
|
||||||
}
|
|
||||||
@ -71,4 +71,45 @@ public class GwTenantRoute
|
|||||||
/// 版本号,用于乐观并发
|
/// 版本号,用于乐观并发
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Version { get; set; } = 0;
|
public int Version { get; set; } = 0;
|
||||||
|
|
||||||
|
// ===== 路由匹配能力 =====
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HTTP 方法匹配(如 "GET,POST")
|
||||||
|
/// </summary>
|
||||||
|
public string? Methods { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Host 头匹配(如 "api.example.com")
|
||||||
|
/// </summary>
|
||||||
|
public string? Hosts { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Header 匹配规则(JSON 格式)
|
||||||
|
/// </summary>
|
||||||
|
public string? Headers { get; set; }
|
||||||
|
|
||||||
|
// ===== 策略配置 =====
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 路由级别负载均衡策略覆盖
|
||||||
|
/// </summary>
|
||||||
|
public string? LoadBalancingPolicy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 授权策略
|
||||||
|
/// </summary>
|
||||||
|
public string? AuthorizationPolicy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CORS 策略
|
||||||
|
/// </summary>
|
||||||
|
public string? CorsPolicy { get; set; }
|
||||||
|
|
||||||
|
// ===== 请求转换 =====
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求/响应转换规则(JSON 格式)
|
||||||
|
/// </summary>
|
||||||
|
public string? Transforms { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user