add create & update dto workspace-type

This commit is contained in:
2026-06-30 09:37:00 +03:30
parent ae62cffa58
commit d24abe7ee4
2 changed files with 21 additions and 0 deletions
@@ -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;
}
@@ -0,0 +1,4 @@
import { PartialType } from "@nestjs/mapped-types";
import { CreateWorkspaceTypeDto } from "./create-workspace-type.dto";
export class UpdateWorkspaceTypeDto extends PartialType(CreateWorkspaceTypeDto) {}