mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
fixed dtos
This commit is contained in:
@ -6,6 +6,7 @@ import {
|
||||
ValidateNested,
|
||||
IsInt,
|
||||
ArrayNotEmpty,
|
||||
IsOptional,
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { CreateProductItemModelDto } from './create-space-product-item-model.dto';
|
||||
@ -65,3 +66,23 @@ export class UpdateSpaceProductModelDto {
|
||||
@Type(() => CreateProductItemModelDto)
|
||||
items: CreateProductItemModelDto[];
|
||||
}
|
||||
|
||||
export class ModifyProductItemModelDto {
|
||||
@IsArray()
|
||||
@ApiProperty({
|
||||
description: 'Create the product model ',
|
||||
type: [CreateSpaceProductModelDto],
|
||||
})
|
||||
@ValidateNested({ each: true })
|
||||
@IsOptional()
|
||||
add?: CreateSpaceProductModelDto[];
|
||||
|
||||
@IsArray()
|
||||
@ApiProperty({
|
||||
description: 'Update the product model ',
|
||||
type: [UpdateSpaceProductModelDto],
|
||||
})
|
||||
@ValidateNested({ each: true })
|
||||
@IsOptional()
|
||||
update?: UpdateSpaceProductModelDto[];
|
||||
}
|
||||
|
Reference in New Issue
Block a user