diff --git a/src/modules/task-manager/dto/remark/create-remark.dto.ts b/src/modules/task-manager/dto/remark/create-remark.dto.ts new file mode 100644 index 0000000..b735dfe --- /dev/null +++ b/src/modules/task-manager/dto/remark/create-remark.dto.ts @@ -0,0 +1,21 @@ +import { ApiProperty } from "@nestjs/swagger"; +import { IsString, IsNotEmpty, IsUUID, IsOptional, MaxLength } from "class-validator"; + +export class CreateRemarkDto { + @ApiProperty({ description: "Title of the remark", example: "This task needs review" }) + @IsString() + @IsNotEmpty() + @MaxLength(150) + title: string; + + @ApiProperty({ description: "Color code for the remark", required: false, example: "#F59E0B" }) + @IsString() + @IsOptional() + @MaxLength(20) + color?: string; + + @ApiProperty({ description: "ID of the task this remark belongs to", example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }) + @IsUUID() + @IsNotEmpty() + taskId: string; +} diff --git a/src/modules/task-manager/dto/remark/update-remark.dto.ts b/src/modules/task-manager/dto/remark/update-remark.dto.ts new file mode 100644 index 0000000..06610d3 --- /dev/null +++ b/src/modules/task-manager/dto/remark/update-remark.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from "@nestjs/swagger"; +import { CreateRemarkDto } from "./create-remark.dto"; + +export class UpdateRemarkDto extends PartialType(CreateRemarkDto) {}