mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-17 03:05:13 +00:00
fixed dtos
This commit is contained in:
@ -6,6 +6,7 @@ import {
|
|||||||
ValidateNested,
|
ValidateNested,
|
||||||
IsInt,
|
IsInt,
|
||||||
ArrayNotEmpty,
|
ArrayNotEmpty,
|
||||||
|
IsOptional,
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import { CreateProductItemModelDto } from './create-space-product-item-model.dto';
|
import { CreateProductItemModelDto } from './create-space-product-item-model.dto';
|
||||||
@ -65,3 +66,23 @@ export class UpdateSpaceProductModelDto {
|
|||||||
@Type(() => CreateProductItemModelDto)
|
@Type(() => CreateProductItemModelDto)
|
||||||
items: 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