Added payedDonationAmount to donor and responsedonor
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/pr Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/pr Build is passing
				
			ref #193
This commit is contained in:
		| @@ -33,6 +33,15 @@ export class Donor extends Participant { | ||||
|     return this.donations.reduce((sum, current) => sum + current.amount, 0); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * Returns the total payed donations of a donor based on his linked donations. | ||||
|   */ | ||||
|   @IsInt() | ||||
|   public get payedDonationAmount(): number { | ||||
|     if (!this.donations) { return 0; } | ||||
|     return this.donations.reduce((sum, current) => sum + current.payedAmount, 0); | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * Turns this entity into it's response class. | ||||
|    */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user