implmentação swagger no modulo orders-payment

This commit is contained in:
JurTI-BR
2025-04-02 18:13:47 -03:00
parent 28a1cee876
commit 4719279ab7
36 changed files with 944 additions and 820 deletions

View File

@@ -0,0 +1,67 @@
import { ApiProperty } from '@nestjs/swagger';
export class PaymentDto {
@ApiProperty({
description: 'ID do pedido',
example: 12345,
})
orderId: number;
@ApiProperty({
description: 'Data do pagamento',
example: '2024-04-02T10:00:00Z',
})
payDate: Date;
@ApiProperty({
description: 'Número do cartão',
example: '**** **** **** 1234',
})
card: string;
@ApiProperty({
description: 'Número de parcelas',
example: 3,
})
installments: number;
@ApiProperty({
description: 'Nome da bandeira',
example: 'VISA',
})
flagName: string;
@ApiProperty({
description: 'Tipo de pagamento',
example: 'CREDITO',
})
type: string;
@ApiProperty({
description: 'Valor do pagamento',
example: 1000.00,
})
amount: number;
@ApiProperty({
description: 'ID do usuário',
example: '001',
})
userId: string;
@ApiProperty({
description: 'NSU da transação',
example: '123456789',
})
nsu: string;
@ApiProperty({
description: 'Código de autorização',
example: 'A12345',
})
auth: string;
constructor(partial: Partial<PaymentDto>) {
Object.assign(this, partial);
}
}