feat: added remark DTOs
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from "@nestjs/swagger";
|
||||||
|
import { CreateRemarkDto } from "./create-remark.dto";
|
||||||
|
|
||||||
|
export class UpdateRemarkDto extends PartialType(CreateRemarkDto) {}
|
||||||
Reference in New Issue
Block a user