Add AddCommunityDto class with properties

This commit is contained in:
faris Aljohari
2024-03-31 22:30:05 +03:00
parent 75197664fd
commit 9654d58ea0
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsOptional } from 'class-validator';
export class AddCommunityDto {
@ApiProperty({
description: 'spaceName',
required: true,
})
@IsString()
@IsNotEmpty()
public spaceName: string;
@ApiProperty({
description: 'parentUuid',
required: false,
})
@IsString()
@IsOptional()
public parentUuid?: string;
@ApiProperty({
description: 'spaceTypeUuid',
required: true,
})
@IsString()
@IsNotEmpty()
public spaceTypeUuid: string;
constructor(dto: Partial<AddCommunityDto>) {
Object.assign(this, dto);
}
}

View File

@ -0,0 +1 @@
export * from './add.community.dto';