feat: fix swagger examples

This commit is contained in:
Abdalhamid Alhamad
2025-07-27 13:26:21 +03:00
parent c493bd57e1
commit 1541c374ed
3 changed files with 29 additions and 26 deletions

View File

@ -1,79 +1,79 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Customer } from '~/customer/entities';
import { CustomerStatus, KycStatus } from '~/customer/enums';
import { CustomerStatus, Gender, KycStatus } from '~/customer/enums';
import { DocumentMetaResponseDto } from '~/document/dtos/response';
export class CustomerResponseDto {
@ApiProperty()
@ApiProperty({ example: '123e4567-e89b-12d3-a456-426614174000' })
id!: string;
@ApiProperty()
@ApiProperty({ example: CustomerStatus.PENDING })
customerStatus!: CustomerStatus;
@ApiProperty()
@ApiProperty({ example: KycStatus.PENDING })
kycStatus!: KycStatus;
@ApiProperty()
@ApiProperty({ example: 'Rejection reason if any' })
rejectionReason!: string | null;
@ApiProperty()
@ApiProperty({ example: 'John' })
firstName!: string;
@ApiProperty()
@ApiProperty({ example: 'Doe' })
lastName!: string;
@ApiProperty()
@ApiProperty({ example: '1990-01-01' })
dateOfBirth!: Date;
@ApiProperty()
@ApiProperty({ example: '123456789' })
nationalId!: string;
@ApiProperty()
@ApiProperty({ example: '2025-01-01' })
nationalIdExpiry!: Date;
@ApiProperty()
@ApiProperty({ example: 'JO' })
countryOfResidence!: string;
@ApiProperty()
@ApiProperty({ example: 'Employee' })
sourceOfIncome!: string;
@ApiProperty()
@ApiProperty({ example: 'Software Development' })
profession!: string;
@ApiProperty()
@ApiProperty({ example: 'Full-time' })
professionType!: string;
@ApiProperty()
@ApiProperty({ example: false })
isPep!: boolean;
@ApiProperty()
@ApiProperty({ example: Gender.MALE })
gender!: string;
@ApiProperty()
@ApiProperty({ example: false })
isJunior!: boolean;
@ApiProperty()
@ApiProperty({ example: true })
isGuardian!: boolean;
@ApiProperty()
@ApiProperty({ example: 12345 })
waitingNumber!: number;
@ApiProperty()
@ApiProperty({ example: 'SA' })
country!: string | null;
@ApiProperty()
@ApiProperty({ example: 'Riyadh' })
region!: string | null;
@ApiProperty()
@ApiProperty({ example: 'Riyadh City' })
city!: string | null;
@ApiProperty()
@ApiProperty({ example: 'Al-Masif' })
neighborhood!: string | null;
@ApiProperty()
@ApiProperty({ example: 'King Fahd Road' })
street!: string | null;
@ApiProperty()
@ApiProperty({ example: '123' })
building!: string | null;
@ApiPropertyOptional({ type: DocumentMetaResponseDto })