diff --git a/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwCluster.cs b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwCluster.cs new file mode 100644 index 0000000..9139bd6 --- /dev/null +++ b/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwCluster.cs @@ -0,0 +1,79 @@ +namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate; + +/// +/// 网关集群聚合根 - 表示后端服务集群配置 +/// +public class GwCluster +{ + public string Id { get; set; } = Guid.CreateVersion7().ToString("N"); + + /// + /// 集群业务标识 + /// + public string ClusterId { get; set; } = string.Empty; + + /// + /// 集群名称 + /// + public string Name { get; set; } = string.Empty; + + /// + /// 描述 + /// + public string? Description { get; set; } + + /// + /// 目标端点列表(内嵌) + /// + public List Destinations { get; set; } = new(); + + /// + /// 负载均衡策略 + /// + public string LoadBalancingPolicy { get; set; } = "RoundRobin"; + + /// + /// 健康检查配置 + /// + public GwHealthCheckConfig? HealthCheck { get; set; } + + /// + /// 会话亲和配置 + /// + public GwSessionAffinityConfig? SessionAffinity { get; set; } + + /// + /// 状态 + /// + public int Status { get; set; } = 1; + + /// + /// 创建人ID + /// + public long? CreatedBy { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreatedTime { get; set; } = DateTime.UtcNow; + + /// + /// 更新人ID + /// + public long? UpdatedBy { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdatedTime { get; set; } + + /// + /// 是否删除 + /// + public bool IsDeleted { get; set; } = false; + + /// + /// 版本号,用于乐观并发 + /// + public int Version { get; set; } = 0; +}