diff --git a/src/modules/task-manager/dto/workspace-type/create-workspace-type.dto.ts b/src/modules/task-manager/dto/workspace-type/create-workspace-type.dto.ts new file mode 100644 index 0000000..9b00e3f --- /dev/null +++ b/src/modules/task-manager/dto/workspace-type/create-workspace-type.dto.ts @@ -0,0 +1,17 @@ +import { IsString, IsOptional, IsInt, IsNotEmpty, MaxLength, Min } from "class-validator"; + +export class CreateWorkspaceTypeDto { + @IsString() + @IsNotEmpty() + @MaxLength(100) + name: string; + + @IsString() + @IsOptional() + description?: string; + + @IsInt() + @IsOptional() + @Min(0) + order?: number; +} diff --git a/src/modules/task-manager/dto/workspace-type/update-workspace-type.dto.ts b/src/modules/task-manager/dto/workspace-type/update-workspace-type.dto.ts new file mode 100644 index 0000000..86e8b47 --- /dev/null +++ b/src/modules/task-manager/dto/workspace-type/update-workspace-type.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from "@nestjs/mapped-types"; +import { CreateWorkspaceTypeDto } from "./create-workspace-type.dto"; + +export class UpdateWorkspaceTypeDto extends PartialType(CreateWorkspaceTypeDto) {}