fix: ajuste no endpoint de impressão de pedidos.
This commit is contained in:
33
src/products/dto/product-detail-query.dto.ts
Normal file
33
src/products/dto/product-detail-query.dto.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsArray, IsNotEmpty, IsNumber, IsString } from 'class-validator';
|
||||
|
||||
/**
|
||||
* DTO para requisição de detalhes de produtos
|
||||
*/
|
||||
export class ProductDetailQueryDto {
|
||||
@ApiProperty({
|
||||
description: 'Código da região para buscar o preço',
|
||||
example: 1,
|
||||
})
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
numregiao: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Array de códigos de produtos',
|
||||
example: [1, 2, 3],
|
||||
type: [Number],
|
||||
})
|
||||
@IsArray()
|
||||
@IsNotEmpty()
|
||||
codprod: number[];
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Código da filial',
|
||||
example: '1',
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
codfilial: string;
|
||||
}
|
||||
|
||||
55
src/products/dto/product-detail-response.dto.ts
Normal file
55
src/products/dto/product-detail-response.dto.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
/**
|
||||
* DTO para resposta de detalhes de produtos
|
||||
*/
|
||||
export class ProductDetailResponseDto {
|
||||
@ApiProperty({
|
||||
description: 'Código do produto',
|
||||
example: 12345,
|
||||
})
|
||||
codprod: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Descrição completa do produto (com marca)',
|
||||
example: 'PRODUTO EXEMPLO - MARCA EXEMPLO',
|
||||
})
|
||||
descricao: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Tipo de embalagem',
|
||||
example: 'UN',
|
||||
})
|
||||
embalagem: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Código auxiliar (código de barras)',
|
||||
example: '7891234567890',
|
||||
})
|
||||
codauxiliar: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Nome da marca',
|
||||
example: 'MARCA EXEMPLO',
|
||||
})
|
||||
marca: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Preço de venda do produto',
|
||||
example: 99.90,
|
||||
})
|
||||
preco: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Nome da filial',
|
||||
example: 'FILIAL MATRIZ',
|
||||
})
|
||||
filial: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Nome da região',
|
||||
example: 'REGIÃO SUL',
|
||||
})
|
||||
regiao: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user