added subspace model remaining dtos

This commit is contained in:
hannathkadher
2024-12-12 16:19:37 +04:00
parent ff7c02d584
commit 8d0001cb95
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import { IsString, IsNotEmpty } from 'class-validator';
export class SubspaceProductItemModelDto {
@IsString()
@IsNotEmpty()
uuid: string;
@IsString()
@IsNotEmpty()
tag: string;
@IsString()
@IsNotEmpty()
subspaceProductModelUuid: string;
}

View File

@ -0,0 +1,23 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
import { SubspaceProductItemModelDto } from './subspace-product-item-model.dto';
export class SubpaceProductModelDto {
@IsString()
@IsNotEmpty()
uuid: string;
@IsNumber()
@IsNotEmpty()
productCount: number;
@IsString()
@IsNotEmpty()
productUuid: string;
@ApiProperty({
description: 'List of individual items with specific names for the product',
type: [SubspaceProductItemModelDto],
})
items: SubspaceProductItemModelDto[];
}