mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
34 lines
961 B
TypeScript
34 lines
961 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsNotEmpty, IsString, IsArray, ValidateNested } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
import { CreateSubspaceModelDto } from './subspaces-model-dtos/create-subspace-model.dto';
|
|
import { ProcessTagDto } from 'src/tags/dtos';
|
|
|
|
export class CreateSpaceModelDto {
|
|
@ApiProperty({
|
|
description: 'Name of the space model',
|
|
example: 'Apartment Model',
|
|
})
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
modelName: string;
|
|
|
|
@ApiProperty({
|
|
description: 'List of subspaces included in the model',
|
|
type: [CreateSubspaceModelDto],
|
|
})
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => CreateSubspaceModelDto)
|
|
subspaceModels?: CreateSubspaceModelDto[];
|
|
|
|
@ApiProperty({
|
|
description: 'List of tags associated with the space model',
|
|
type: [ProcessTagDto],
|
|
})
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => ProcessTagDto)
|
|
tags?: ProcessTagDto[];
|
|
}
|