feat: added check list item DTOs
This commit is contained in:
@@ -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) {}
|
||||||
Reference in New Issue
Block a user