add create & update dto workspace-type
This commit is contained in:
@@ -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) {}
|
||||
Reference in New Issue
Block a user