xiangning ff895628e5 refactor: 拆分 platform 模块(Auth/Users/Roles/Permissions/Menus/Notifications 从 rag 独立)
- 新建 modules/platform 三层模块(Domain/Application/Infrastructure)
- 搬入 8 个实体(User/Role/Permission/UserRole/RolePermission/RefreshToken/Menu/Notification)
- 新建 PlatformDbContext(连 platform 库)+ 8 个 EF 配置 + SeedData
- 搬入 92 个 Application CQRS 文件 + 57 个 Host Endpoints
- RagDbContext 瘦身:只留 RAG 专属表(KnowledgeBase/Document/ChatMessage/Conversation)
- Handler 注入改为 PlatformDbContext
- appsettings 新增 DatabaseNames:Platform
- BuildFlowHostModule 注册 PlatformDbContext + DependsOn PlatformApplicationModule
- Conversation 实体去掉 User 导航(跨模块不直接引用实体)
- rag SeedData 清空(平台种子归 platform)
- 暂移除测 platform 功能的 Rag.Tests(后续建 platform 测试项目)
- build 0/0
2026-07-02 18:22:17 +08:00

20 lines
730 B
C#

using File.Application.Features.Folders.Commands;
using MediatR;
namespace BuildFlow.Host.Endpoints.file.Folders;
/// <summary>移动文件到目标文件夹端点。POST /api/files/{Id}/move。</summary>
[Authorize]
public class MoveFileEndpoint(IMediator mediator) : Endpoint<MoveFileRequest, object>
{
public override void Configure() => Post("/files/{Id}/move");
public override async Task HandleAsync(MoveFileRequest req, CancellationToken ct)
{
var targetId = string.IsNullOrEmpty(req.TargetFolderId) ? (Guid?)null : Guid.Parse(req.TargetFolderId);
await mediator.Send(new MoveFileCommand(Guid.Parse(req.Id), targetId), ct);
await Send.OkAsync(new { message = "moved" }, ct);
}
}