Commit Graph

33 Commits

Author SHA1 Message Date
movingsam
2abc87af8a refactor: 合并 CI 配置并添加缓存清理
Some checks failed
Publish NuGet Packages / publish (push) Failing after 11s
2026-03-01 00:31:08 +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
396cb4010c refactor(migrations): 删除初始数据库迁移及OpenIddict表相关脚本
Some checks failed
Publish NuGet Packages / build (push) Failing after 20s
Publish NuGet Package / publish (push) Failing after 22s
- 删除Initial迁移代码及其对应模型建表定义
- 移除相关的SQL迁移脚本,包括Initial和OpenIddict表的创建语句
- 清理所有与Initial迁移和OpenIddict相关的表结构和索引定义
- 该变更旨在重新规划数据库迁移结构和初始化过程
2026-03-01 00:21:35 +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
f4e4aca443 fix(workflows): 修复发布NuGet工作流的环境变量名称
Some checks failed
Publish NuGet Packages / build (push) Failing after 19s
Publish NuGet Package / publish (push) Failing after 22s
- 将GITEA_API_TOKEN环境变量更正为GITEA_TOKEN
- 修正了YAML文件中的变量引用错误
- 确保工作流正确使用秘钥进行身份验证
- 避免因错误变量导致的发布失败
2026-03-01 00:07:25 +08:00
movingsam
3ae057cdd8 fix: 修复环境变量为 GITEA_TOKEN
Some checks failed
Publish NuGet Packages / build (push) Failing after 19s
Publish NuGet Package / publish (push) Failing after 9s
2026-03-01 00:04:29 +08:00
movingsam
140d844f70 fix: 修复 CI 环境变量名称
All checks were successful
Publish NuGet Packages / build (push) Successful in 13s
2026-03-01 00:03:37 +08:00
movingsam
55a57408b3 fix: 修复 CI/CD 配置
Some checks failed
Publish NuGet Packages / build (push) Failing after 38s
Publish NuGet Package / publish (push) Failing after 12s
- 移除 docker.yml (不需要 Docker 构建)
- 修复 nuget.yml 中 YAML 语法错误 (双引号改为单引号)
2026-02-28 23:57:19 +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
a04dc199c9 Update secret name to GITEATOKEN
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 8m29s
2026-02-26 13:05:52 +08:00
a6ec824a37 Update secret name to GITEATOKEN
Some checks are pending
Build and Push Docker / build (push) Waiting to run
Publish NuGet Packages / build (push) Waiting to run
2026-02-26 13:05:38 +08:00
e81b1aeef5 Update Docker CI for org
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 30s
2026-02-26 13:00:19 +08:00
33cba4a084 Update NuGet CI for org
Some checks failed
Publish NuGet Packages / build (push) Waiting to run
Build and Push Docker / build (push) Has been cancelled
2026-02-26 12:59:58 +08:00
872e586cdd Add Docker CI workflow
Some checks failed
Build and Push Docker / build (push) Failing after 30s
Publish NuGet Packages / build (push) Failing after 31s
2026-02-26 10:58:41 +08:00
3db3b3393c Add NuGet CI workflow
Some checks failed
Publish NuGet Packages / build (push) Has been cancelled
2026-02-26 10:57:27 +08:00
62f8c3c5a0 Delete .gitea/workflows 2026-02-26 10:57:13 +08:00
54288f3817 Add NuGet CI workflow 2026-02-26 10:56:41 +08:00
ac47785d5b Create workflows directory 2026-02-26 10:56:40 +08:00
e670a1d10c Add Dockerfile 2026-02-26 10:56:06 +08:00
Sam
6d74da7890 Add .gitignore 2026-02-25 17:23:55 +08:00
Sam
405936890c docs: add hierarchical AGENTS.md for subdirectories 2026-02-23 00:55:03 +08:00
movingsam
e9b7a362e0 feat[platform]: add fengling-api OAuth client for introspection
- Add RegisterApiClientAsync to seed OpenIddict applications
- Register fengling-api client for Console backend token introspection
- Client secret: fengling-api-secret (Confidential, with Introspection permission)

This enables Console backend to validate tokens via introspection endpoint.
2026-02-21 16:43:26 +08:00
movingsam
95bd5847f7 调整配置 2026-02-21 16:31:47 +08:00
movingsam
bbdd88e6a1 配置调整 2026-02-21 16:29:56 +08:00
movingsam
d2adce6030 openid的模型也迁移一下 2026-02-21 15:13:44 +08:00
movingsam
b97c2038a6 调整项目 2026-02-21 15:05:37 +08:00
movingsam
c1f1e09796 refactor(console): remove Repository layer, use Manager pattern
- Remove Repositories folder (IUserRepository, UserRepository, IRoleRepository, RoleRepository)
- Remove Managers folder (old TenantManager)
- Remove Datas folder (old ApplicationDbContext)
- Remove Models/Entities folder (old domain entities)
- Remove EntityConfigurations folder
- Update Services to use UserManager/RoleManager/PlatformDbContext directly
- Update DTOs to use Platform's TenantStatus
2026-02-21 13:52: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
f9bd73a71d refactor(console): migrate tenant management to TenantManager pattern
- Replace TenantRepository with TenantManager (ASP.NET Identity style)
- Change TenantId from long to int (auto-increment)
- Add TenantStore with CRUD operations
- Update TenantService, UserService, RoleService to use TenantManager
- Add Tenant entity with TenantStatus enum
- Update DTOs and controllers for int tenant IDs
2026-02-19 21:43:24 +08:00
movingsam
0bbc97e4a1 refactor: align TenantRepository with CleanDDD/NetCorePal规范
- remove duplicate ITenantRepository/TenantRepository from Console
- extend Platform ITenantRepository with GetByIdAsync, GetPagedAsync, CountAsync
- update Console services to use Platform.Infrastructure.Repositories
- fix nullable warnings (UserDto, OAuthClientService)
- fix YarpGateway Directory.Build.props duplicate import
- fix DynamicProxyConfigProvider CS8618 warning
2026-02-19 19:20:06 +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