22 lines
656 B
TypeScript
22 lines
656 B
TypeScript
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;
|
|
}
|