Files
backend/src/space/dtos/subspace/add.subspace.dto.ts
faris Aljohari a9e5454b61 Add space product
2025-02-27 13:36:28 +03:00

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[];
}