mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
31 lines
651 B
TypeScript
31 lines
651 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import {
|
|
IsArray,
|
|
IsNotEmpty,
|
|
IsOptional,
|
|
IsString,
|
|
ValidateNested,
|
|
} from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
import { ProcessTagDto } from 'src/tags/dtos';
|
|
|
|
export class AddSubspaceDto {
|
|
@ApiProperty({
|
|
example: 'Meeting Room 1',
|
|
description: 'Name of the subspace',
|
|
})
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
subspaceName: string;
|
|
|
|
@ApiProperty({
|
|
description: 'List of tags associated with the subspace',
|
|
type: [ProcessTagDto],
|
|
})
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => ProcessTagDto)
|
|
@IsOptional()
|
|
tags?: ProcessTagDto[];
|
|
}
|