feat: added task phase APIs
This commit is contained in:
@@ -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) {}
|
||||
Reference in New Issue
Block a user