mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 05:42:27 +00:00
69 lines
1.3 KiB
TypeScript
69 lines
1.3 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Expose, Type } from 'class-transformer';
|
|
import { IsNumber, IsPositive, IsString } from 'class-validator';
|
|
|
|
export class AccountTransactionWebhookRequest {
|
|
@Expose({ name: 'InstId' })
|
|
@IsString()
|
|
@ApiProperty({ name: 'InstId', example: '9000' })
|
|
instId!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '143761' })
|
|
transactionId!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '0037' })
|
|
transactionType!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '26' })
|
|
transactionCode!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '6823000000000018' })
|
|
accountNumber!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '6823000000000018' })
|
|
accountId!: string;
|
|
|
|
@Expose()
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@ApiProperty({ example: '7080.15' })
|
|
otb!: number;
|
|
|
|
@Expose()
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@IsPositive()
|
|
@ApiProperty({ example: '3050.95' })
|
|
amount!: number;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: 'C' })
|
|
sign!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ example: '682' })
|
|
currency!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ name: 'Date', example: '20241112' })
|
|
date!: string;
|
|
|
|
@Expose()
|
|
@IsString()
|
|
@ApiProperty({ name: 'Time', example: '125340' })
|
|
time!: string;
|
|
}
|