feat(decisions): add dto
This commit is contained in:
parent
284fba0d3a
commit
df054750f2
1 changed files with 56 additions and 0 deletions
56
src/decisions/dto.ts
Normal file
56
src/decisions/dto.ts
Normal file
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in a new issue