implmentação swagger no modulo orders-payment
This commit is contained in:
67
src/orders-payment/dto/payment.dto.ts
Normal file
67
src/orders-payment/dto/payment.dto.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user