mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 22:24:55 +00:00
33 lines
635 B
TypeScript
33 lines
635 B
TypeScript
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);
|
|
}
|
|
}
|