feat: added check list item DTOs

This commit is contained in:
2026-07-01 16:16:39 +03:30
parent 31e3b5f00d
commit db61030b44
2 changed files with 24 additions and 0 deletions
@@ -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;
}
@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/swagger';
import { CreateCheckListItemDto } from './create-check-list-item.dto';
export class UpdateCheckListItemDto extends PartialType(CreateCheckListItemDto) {}