feat(平台): 补齐服务端持久化和AI拆解契约
This commit is contained in:
46
apps/server/src/modules/ai/dto/decompose.dto.ts
Normal file
46
apps/server/src/modules/ai/dto/decompose.dto.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { IsString, IsArray, ValidateNested, IsOptional } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class DecomposeReqMemberDto {
|
||||
@IsString()
|
||||
name!: string;
|
||||
|
||||
@IsString()
|
||||
role!: string;
|
||||
}
|
||||
|
||||
export class DecomposeReqRequirementDto {
|
||||
@IsString()
|
||||
id!: string;
|
||||
|
||||
@IsString()
|
||||
code!: string;
|
||||
|
||||
@IsString()
|
||||
title!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export class DecomposeDto {
|
||||
@IsString()
|
||||
prototypeUrl!: string;
|
||||
|
||||
@IsString()
|
||||
versionId!: string;
|
||||
|
||||
@IsString()
|
||||
planId!: string;
|
||||
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => DecomposeReqRequirementDto)
|
||||
requirements!: DecomposeReqRequirementDto[];
|
||||
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => DecomposeReqMemberDto)
|
||||
members!: DecomposeReqMemberDto[];
|
||||
}
|
||||
Reference in New Issue
Block a user