feat: added task phase APIs

This commit is contained in:
2026-07-01 12:53:42 +03:30
parent 89d85e6d24
commit bf98b8b9ce
6 changed files with 226 additions and 36 deletions
@@ -0,0 +1,27 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsString, IsOptional, IsNotEmpty, IsUUID, IsInt, MaxLength, Min } from "class-validator";
export class CreateTaskPhaseDto {
@ApiProperty({ description: "Name of the task phase", example: "In Progress" })
@IsString()
@IsNotEmpty()
@MaxLength(100)
name: string;
@ApiProperty({ description: "Display order of the task phase", required: false, example: 1 })
@IsInt()
@IsOptional()
@Min(0)
order?: number;
@ApiProperty({ description: "Color code for the task phase", required: false, example: "#4F46E5" })
@IsString()
@IsOptional()
@MaxLength(20)
color?: string;
@ApiProperty({ description: "ID of the project this phase belongs to", example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" })
@IsUUID()
@IsNotEmpty()
projectId: string;
}
@@ -0,0 +1,4 @@
import { PartialType } from "@nestjs/swagger";
import { CreateTaskPhaseDto } from "./create-task-phase.dto";
export class UpdateTaskPhaseDto extends PartialType(CreateTaskPhaseDto) {}