import { ApiProperty } from '@nestjs/swagger' ; import BN from 'bn.js' ; import { Transform } from 'class-transformer' ; import { IsDate , IsNotEmpty , IsNumber , IsString } from 'class-validator' ; export class TradePriceInfoDTO < TProduct > { constructor ( partial ) { Object . assign ( this , partial ) ; } @ ApiProperty ( { type : Date , example : 'Tue Nov 16 2021 16:09:43 GMT-0500' } ) @ IsNotEmpty ( ) @ IsDate ( ) public created : Date ; @ Transform ( ( value ) => value . toString ( 10 ) ) public volume : BN ; @ ApiProperty ( { type : Number } ) @ IsNotEmpty ( ) @ IsNumber ( ) public price : number ; public product : TProduct ; @ ApiProperty ( { type : String } ) @ IsNotEmpty ( ) @ IsString ( ) public assetId : string ; }