fix: ajuste no endpoint de impressão de pedidos.

This commit is contained in:
joelson brito
2025-11-05 15:40:32 -03:00
parent 3849fa1c4e
commit e448a44144
13 changed files with 847 additions and 165 deletions

View 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;
}

View 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;
}