mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 00:14:54 +00:00
Add AddCommunityDto class with properties
This commit is contained in:
32
src/community/dtos/add.community.dto.ts
Normal file
32
src/community/dtos/add.community.dto.ts
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
src/community/dtos/index.ts
Normal file
1
src/community/dtos/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './add.community.dto';
|
||||||
Reference in New Issue
Block a user