mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
24 lines
623 B
TypeScript
24 lines
623 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsArray, IsNotEmpty, IsString, ValidateNested } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
import { ProcessTagDto } from 'src/tags/dtos';
|
|
|
|
export class CreateSubspaceModelDto {
|
|
@ApiProperty({
|
|
description: 'Name of the subspace',
|
|
example: 'Living Room',
|
|
})
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
subspaceName: string;
|
|
|
|
@ApiProperty({
|
|
description: 'List of tag models associated with the subspace',
|
|
type: [ProcessTagDto],
|
|
})
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => ProcessTagDto)
|
|
tags?: ProcessTagDto[];
|
|
}
|