Files
backend/src/space/dtos/subspace/add.subspace.dto.ts
ZaydSkaff 689a38ee0c Revamp/space management (#409)
* task: add getCommunitiesV2

* task: update getOneSpace API to match revamp structure

* refactor: implement modifications to pace management APIs

* refactor: remove space link
2025-06-18 10:34:29 +03:00

32 lines
770 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import {
IsArray,
IsNotEmpty,
IsOptional,
IsString,
ValidateNested,
} from 'class-validator';
import { ProcessTagDto } from 'src/tags/dtos';
import { CreateProductAllocationDto } from '../create-product-allocation.dto';
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(() => CreateProductAllocationDto)
@IsOptional()
productAllocations?: CreateProductAllocationDto[];
}