Files
backend/src/space-model/dtos/update-space-model.dto.ts
ZaydSkaff 8503ee728d Refactor/space management (#404)
* refactor: reducing used queries on get communities (#385)

* refactor: fix create space logic (#394)

* Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity

* refactor: fix create space logic

* device model updated to include the fixes and final columns

* updated space models to include suggested fixes, update final logic and column names

* task: removing old references of the old tag-product relation

* task: remove old use of tags

* task: remove old tag & tag model usage

* refactor: delete space

* task: remove unused functions

* fix lint rule
2025-06-11 13:15:21 +03:00

42 lines
1.2 KiB
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsArray, IsOptional, IsString, ValidateNested } from 'class-validator';
import {
DeleteSubspaceModelDto,
ModifySubspaceModelDto,
UpdateSubspaceModelDto,
} from './subspaces-model-dtos';
import { CreateSubspaceModelDto } from './subspaces-model-dtos/create-subspace-model.dto';
import { ModifyTagDto } from 'src/space/dtos/tag/modify-tag.dto';
export class UpdateSpaceModelDto {
@ApiProperty({
description: 'Updated name of the space model',
example: 'New Space Model Name',
})
@IsOptional()
@IsString()
modelName?: string;
@ApiPropertyOptional({
description: 'List of subspace modifications (add/update/delete)',
type: [ModifySubspaceModelDto],
})
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => ModifySubspaceModelDto)
subspaceModels?: ModifySubspaceModelDto[];
@ApiPropertyOptional({
description:
'List of tag modifications (add/update/delete) for the space model',
type: [ModifyTagDto],
})
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => ModifyTagDto)
tags?: ModifyTagDto[];
}