fengling-platform/Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs
movingsam 1b8c937aa4
Some checks failed
Build and Push Docker / build (push) Failing after 23s
Publish NuGet Packages / build (push) Failing after 8s
feat: 添加 Gateway 路由实体到 Platform
- 新增 GatewayAggregate 领域实体 (GwTenant, GwTenantRoute, GwServiceInstance)
- 新增 IRouteStore, RouteStore, IInstanceStore, InstanceStore
- 新增 IRouteManager, RouteManager
- 合并 GatewayDbContext 到 PlatformDbContext
- 统一 Extensions.AddPlatformCore 注册所有服务
2026-02-28 23:53:00 +08:00

70 lines
1.5 KiB
C#

namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
/// <summary>
/// 网关服务实例实体 - 表示负载均衡的服务实例
/// </summary>
public class GwServiceInstance
{
public long Id { get; set; }
/// <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;
}