import { TspProviderResponseStatus } from '@/generated/prisma/enums' import { ApiProperty } from '@nestjs/swagger' import { IsBoolean, IsDateString, IsEnum, IsObject, IsOptional, IsString, } from 'class-validator' export class TspProviderGetResultDto { @ApiProperty() @IsString() tax_id: string @ApiProperty({ enum: TspProviderResponseStatus }) @IsEnum(TspProviderResponseStatus) status: TspProviderResponseStatus @ApiProperty({ required: true }) @IsBoolean() hasError: boolean @ApiProperty({ required: false, nullable: true }) @IsOptional() @IsString() message?: string | null @ApiProperty({ required: false, nullable: true, type: Object }) @IsOptional() @IsObject() provider_response_payload?: Object @ApiProperty({ required: true }) @IsDateString() sent_at: string @ApiProperty({ required: true }) @IsDateString() received_at: string }