Commit Graph

14 Commits

Author SHA1 Message Date
movingsam
774e3fba00 feat(03-01): add GwCluster aggregate root
- Created cluster aggregate root with string Id (GUID)
- Includes ClusterId, Name, Description, Destinations list
- Embeds GwHealthCheckConfig and GwSessionAffinityConfig
- Includes audit fields: CreatedBy, CreatedTime, UpdatedBy, UpdatedTime
- Supports IsDeleted soft delete and Version for optimistic concurrency
2026-03-03 15:32:41 +08:00
movingsam
7ec34fa094 feat(03-01): add GwDestination value object
- Created destination endpoint value object embedded in GwCluster
- Includes DestinationId, Address, Health, Weight, HealthStatus, Status fields
- Compatible with YARP Destination config structure
2026-03-03 15:31:53 +08:00
movingsam
b07f56c395 feat(03-01): add GwSessionAffinityConfig value object
- Created session affinity configuration value object
- Includes Enabled, Policy, AffinityKeyName fields
- Supports Header and Cookie policies
2026-03-03 15:31:31 +08:00
movingsam
198dc2a877 feat(03-01): add GwHealthCheckConfig value object
- Created health check configuration value object
- Includes Enabled, Path, IntervalSeconds, TimeoutSeconds fields
- Matches YARP ClusterConfig health check structure
2026-03-03 15:31:02 +08:00
movingsam
6f1dbba4f0 refactor(infrastructure): 将主键类型从 long 改为 string 并使用 Guid 生成唯一 ID
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 类型
- 保证相关存储及查询接口兼容新的字符串形式主键
2026-03-01 11:23:12 +08:00
movingsam
79130fd64b fix: 禁用默认EmbeddedResource扫描 解决.NET 10 MSB3552错误
Some checks failed
Publish Platform NuGet Packages / build (push) Failing after 52s
2026-03-01 01:10:43 +08:00
movingsam
e25240f6a5 fix: 移除不必要的 EnableDefaultEmbeddedResourceItems 配置
All checks were successful
Publish NuGet Packages / build (push) Successful in 1m16s
2026-03-01 00:28:27 +08:00
movingsam
04e8aa100e fix: 添加 EnableDefaultEmbeddedResourceItems=false 修复资源文件错误
All checks were successful
Publish NuGet Packages / build (push) Successful in 11s
2026-03-01 00:26:16 +08:00
movingsam
37c1796341 fix: 修复 csproj 文件格式
Some checks failed
Publish NuGet Packages / build (push) Failing after 18s
Publish NuGet Package / publish (push) Failing after 23s
2026-03-01 00:13:09 +08:00
movingsam
1b8c937aa4 feat: 添加 Gateway 路由实体到 Platform
Some checks failed
Build and Push Docker / build (push) Failing after 23s
Publish NuGet Packages / build (push) Failing after 8s
- 新增 GatewayAggregate 领域实体 (GwTenant, GwTenantRoute, GwServiceInstance)
- 新增 IRouteStore, RouteStore, IInstanceStore, InstanceStore
- 新增 IRouteManager, RouteManager
- 合并 GatewayDbContext 到 PlatformDbContext
- 统一 Extensions.AddPlatformCore 注册所有服务
2026-02-28 23:53:00 +08:00
movingsam
7877f89d35 feat(platform): 增强 Infrastructure 层可扩展性,添加 NuGet 发布脚本与 CI/CD
Some checks failed
Build and Push Docker / build (push) Failing after 16s
Publish NuGet Packages / build (push) Failing after 1h7m51s
## 主要变更

### Infrastructure 层重构
- `PlatformDbContext`: 构造函数改为接受泛型 `DbContextOptions`,支持派生上下文
- `TenantStore<TContext>`: 泛型化实现,支持不同的数据库上下文
- `Extensions`: 新增 `AddPlatformCore<TContext>` 扩展方法,简化服务注册

### 依赖调整
- 移除 Npgsql.EntityFrameworkCore.PostgreSQL 直接依赖,由使用方自行决定数据库提供程序

### CI/CD 集成
- 新增 `.gitea/workflows/publish-nuget.yml` Gitea Actions 工作流
- 新增 `push-platform-nuget.sh` 脚本,支持:
  - 从 git tag 自动获取版本号
  - HTTP/HTTPS 双模式支持
  - 独立 NuGet 配置文件
  - CI/CD 友好的环境变量配置

### 其他
- `NuGet.Config`: 新增 NuGet 配置文件
- `Fengling.Platform.Domain`: 添加 Items 文件夹占位
2026-02-27 13:58:09 +08:00
movingsam
b97c2038a6 调整项目 2026-02-21 15:05:37 +08:00
movingsam
a17dc9c419 refactor(platform): migrate Tenant to anemia model, use Manager pattern
- Convert Tenant to anemia model with long Id (no strong-typed ID)
- Add ApplicationUser, ApplicationRole to Platform.Domain (inherit Identity)
- Add TenantInfo value object for user-tenant redundancy
- Implement TenantManager/TenantStore in Platform.Infrastructure
- Update PlatformDbContext to inherit IdentityDbContext
- Migrate AuthService and Console to use Platform entities
- Remove old TenantRepository (replaced by TenantManager)
- Update AGENTS.md documentation
2026-02-21 13:22:08 +08:00
movingsam
d737688e9b feat(auth): extract Tenant to Platform domain
- Add Fengling.Platform domain and infrastructure projects
- Move Tenant aggregate from AuthService/Console to Platform.Domain
- Add TenantRepository and SeedData to Platform
- Remove duplicate Tenant/TenantInfo models from AuthService and Console
- Update controllers and services to use Platform.Domain.Tenant
- Add new migrations for PlatformDbContext

BREAKING CHANGE: Tenant entity now uses strongly-typed ID (TenantId)
2026-02-18 23:02:03 +08:00