feat: add workspace-type DTOs

This commit is contained in:
2026-06-30 12:31:22 +03:30
parent 9d8ff3603e
commit b0fba4bb84
3 changed files with 79 additions and 5 deletions
@@ -1,17 +1,25 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsString, IsOptional, IsInt, IsNotEmpty, MaxLength, Min } from "class-validator";
export class CreateWorkspaceTypeDto {
@ApiProperty({ description: "Name of the workspace type", example: "Engineering" })
@IsString()
@IsNotEmpty()
@MaxLength(100)
name: string;
@ApiProperty({
description: "Description of the workspace type",
required: false,
example: "Workspace type for engineering related work",
})
@IsString()
@IsOptional()
description?: string;
@ApiProperty({ description: "Display order of the workspace type", example: 1 })
@IsInt()
@IsOptional()
@IsNotEmpty()
@Min(0)
order?: number;
order: number;
}
@@ -1,4 +1,4 @@
import { PartialType } from "@nestjs/mapped-types";
import { CreateWorkspaceTypeDto } from "./create-workspace-type.dto";
import { PartialType } from '@nestjs/swagger';
import { CreateWorkspaceTypeDto } from './create-workspace-type.dto';
export class UpdateWorkspaceTypeDto extends PartialType(CreateWorkspaceTypeDto) {}
export class UpdateWorkspaceTypeDto extends PartialType(CreateWorkspaceTypeDto) {}