feat: add generated code
This commit is contained in:
25
backend/src/stock-status/dto/create-stock-status.dto.ts
Normal file
25
backend/src/stock-status/dto/create-stock-status.dto.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { IsString, IsNotEmpty, IsNumber, IsBoolean, IsOptional } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class CreateStockStatusDto {
|
||||
@ApiProperty({ description: 'ID товара' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
productId: string;
|
||||
|
||||
@ApiProperty({ description: 'Текущее количество на складе', required: false })
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
quantity?: number;
|
||||
|
||||
@ApiProperty({ description: 'Признак наличия товара', required: false })
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
inStock?: boolean;
|
||||
|
||||
@ApiProperty({ description: 'Дата последнего обновления', required: false })
|
||||
@IsOptional()
|
||||
updatedAt?: Date;
|
||||
}
|
||||
4
backend/src/stock-status/dto/update-stock-status.dto.ts
Normal file
4
backend/src/stock-status/dto/update-stock-status.dto.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateStockStatusDto } from './create-stock-status.dto';
|
||||
|
||||
export class UpdateStockStatusDto extends PartialType(CreateStockStatusDto) {}
|
||||
Reference in New Issue
Block a user