space model update

This commit is contained in:
hannathkadher
2024-12-23 20:49:48 +04:00
parent b0eec7c38e
commit 41c86b47eb
4 changed files with 217 additions and 219 deletions

View File

@ -1,15 +1,22 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
import { IsString, IsOptional, IsArray, ValidateNested } from 'class-validator';
import {
IsString,
IsOptional,
IsArray,
ValidateNested,
IsEnum,
} from 'class-validator';
import { ModifyTagModelDto } from '../tag-model-dtos';
import { ModifyAction } from '@app/common/constants/modify-action.enum';
export class ModifySubspaceModelDto {
@ApiProperty({
description: 'Action to perform: add, update, or delete',
example: 'add',
example: ModifyAction.ADD,
})
@IsString()
action: 'add' | 'update' | 'delete';
@IsEnum(ModifyAction)
action: ModifyAction;
@ApiPropertyOptional({
description: 'UUID of the subspace (required for update/delete)',