All checks were successful
Publish Platform NuGet Packages / build (push) Successful in 24s
- 修改 GwServiceInstance 和 GwTenantRoute 的 Id 类型为 string
- 使用 Guid.CreateVersion7().ToString("N") 生成默认唯一标识值
- 更新 IInstanceStore、IRouteManager、IRouteStore 接口中的 FindByIdAsync 方法签名,使用 string? 替代 long?
- 调整 InstanceStore、RouteManager 和 RouteStore 中相应方法实现,支持新的 Id 类型
- 保证相关存储及查询接口兼容新的字符串形式主键
75 lines
1.7 KiB
C#
75 lines
1.7 KiB
C#
namespace Fengling.Platform.Domain.AggregatesModel.GatewayAggregate;
|
|
|
|
/// <summary>
|
|
/// 网关租户路由实体 - 表示路由规则配置
|
|
/// </summary>
|
|
public class GwTenantRoute
|
|
{
|
|
public string Id { get; set; } = Guid.CreateVersion7().ToString("N");
|
|
|
|
/// <summary>
|
|
/// 租户代码
|
|
/// </summary>
|
|
public string TenantCode { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 服务名称
|
|
/// </summary>
|
|
public string ServiceName { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 集群ID
|
|
/// </summary>
|
|
public string ClusterId { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 路径匹配模式
|
|
/// </summary>
|
|
public string PathPattern { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 优先级
|
|
/// </summary>
|
|
public int Priority { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 状态
|
|
/// </summary>
|
|
public int Status { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// 是否全局路由
|
|
/// </summary>
|
|
public bool IsGlobal { get; set; } = false;
|
|
|
|
/// <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;
|
|
}
|