feat: add course AI agent backend

This commit is contained in:
2026-10-14 14:25:42 +09:00
parent 5ccdc1e843
commit 56d7f2060c
20 changed files with 788 additions and 3 deletions
+51
View File
@@ -0,0 +1,51 @@
import { Type } from 'class-transformer';
import { ArrayMaxSize, IsArray, IsInt, IsOptional, IsString, IsUUID, Max, MaxLength, Min, ValidateNested } from 'class-validator';
class AgentWorkspaceFileDto {
@IsString()
@MaxLength(500)
path: string;
@IsString()
@MaxLength(100_000)
content: string;
}
class AgentWorkspaceModuleDto {
@IsString()
@MaxLength(120)
name: string;
@IsOptional()
@IsString()
@MaxLength(120)
folderName?: string;
@IsArray()
@ArrayMaxSize(24)
@ValidateNested({ each: true })
@Type(() => AgentWorkspaceFileDto)
files: AgentWorkspaceFileDto[];
}
export class CreateAgentPlanDto {
@IsUUID()
courseId: string;
@IsOptional()
@IsInt()
@Min(1)
@Max(100)
week?: number;
@IsString()
@Min(1)
@MaxLength(4000)
request: string;
@IsArray()
@ArrayMaxSize(12)
@ValidateNested({ each: true })
@Type(() => AgentWorkspaceModuleDto)
modules: AgentWorkspaceModuleDto[];
}