From df054750f2e17fc57a1a9d028392687f416ef6f2 Mon Sep 17 00:00:00 2001 From: admin-valentin Date: Fri, 31 Jul 2026 10:44:53 +0000 Subject: [PATCH] feat(decisions): add dto --- src/decisions/dto.ts | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/decisions/dto.ts diff --git a/src/decisions/dto.ts b/src/decisions/dto.ts new file mode 100644 index 0000000..eb92b86 --- /dev/null +++ b/src/decisions/dto.ts @@ -0,0 +1,56 @@ +import { IsArray, IsISO8601, IsOptional, IsString, Length } from 'class-validator'; + +export class CreateDecisionDto { + @IsString() + @Length(1, 2000) + context!: string; + + @IsOptional() + @IsArray() + options?: unknown[]; + + @IsOptional() + @IsArray() + assumptions?: unknown[]; + + @IsOptional() + @IsArray() + evidence?: unknown[]; + + @IsOptional() + @IsISO8601() + reviewDueAt?: string; +} + +export class UpdateDecisionDto { + @IsOptional() + @IsString() + @Length(1, 2000) + context?: string; + + @IsOptional() + @IsArray() + options?: unknown[]; + + @IsOptional() + @IsArray() + assumptions?: unknown[]; + + @IsOptional() + @IsArray() + evidence?: unknown[]; + + @IsOptional() + @IsString() + @Length(1, 500) + selectedOption?: string; + + @IsOptional() + @IsString() + @Length(1, 2000) + outcomeReview?: string; + + @IsOptional() + @IsISO8601() + reviewDueAt?: string; +}