mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-30 19:44:55 +00:00
added tag action
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsString, IsOptional, IsArray, ValidateNested } from 'class-validator';
|
||||
import { ModifyTagModelDto } from '../tag-model-dtos';
|
||||
|
||||
export class ModifySubspaceModelDto {
|
||||
@ApiProperty({
|
||||
description: 'Action to perform: add, update, or delete',
|
||||
example: 'add',
|
||||
})
|
||||
@IsString()
|
||||
action: 'add' | 'update' | 'delete';
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'UUID of the subspace (required for update/delete)',
|
||||
example: '123e4567-e89b-12d3-a456-426614174000',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
uuid?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'Name of the subspace (required for add/update)',
|
||||
example: 'Living Room',
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
subspaceName?: string;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description:
|
||||
'List of tag modifications (add/update/delete) for the subspace',
|
||||
type: [ModifyTagModelDto],
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => ModifyTagModelDto)
|
||||
tags?: ModifyTagModelDto[];
|
||||
}
|
||||
Reference in New Issue
Block a user