diff --git a/src/modules/task-manager/dto/check-list-item/create-check-list-item.dto.ts b/src/modules/task-manager/dto/check-list-item/create-check-list-item.dto.ts new file mode 100644 index 0000000..8966881 --- /dev/null +++ b/src/modules/task-manager/dto/check-list-item/create-check-list-item.dto.ts @@ -0,0 +1,20 @@ +import { ApiProperty } from "@nestjs/swagger"; +import { IsString, IsNotEmpty, IsUUID, IsBoolean, MaxLength } from "class-validator"; + +export class CreateCheckListItemDto { + @ApiProperty({ description: "Title of the check list item", example: "Write unit tests" }) + @IsString() + @IsNotEmpty() + @MaxLength(150) + title: string; + + @ApiProperty({ description: "Whether the check list item is done", example: false }) + @IsBoolean() + @IsNotEmpty() + isDone: boolean; + + @ApiProperty({ description: "ID of the task this check list item belongs to", example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }) + @IsUUID() + @IsNotEmpty() + taskId: string; +} diff --git a/src/modules/task-manager/dto/check-list-item/update-check-list-item.dto.ts b/src/modules/task-manager/dto/check-list-item/update-check-list-item.dto.ts new file mode 100644 index 0000000..c171e29 --- /dev/null +++ b/src/modules/task-manager/dto/check-list-item/update-check-list-item.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from '@nestjs/swagger'; +import { CreateCheckListItemDto } from './create-check-list-item.dto'; + +export class UpdateCheckListItemDto extends PartialType(CreateCheckListItemDto) {} \ No newline at end of file