Donation payment management feature/193-donation_payments #194

Merged
niggl merged 14 commits from feature/193-donation_payments into dev 2021-04-14 16:56:24 +00:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 0636616dad - Show all commits

View File

@ -1,4 +1,4 @@
import { IsInt, IsPositive } from 'class-validator';
import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { getConnection } from 'typeorm';
import { DonorNotFoundError } from '../../../errors/DonorErrors';
import { Donation } from '../../entities/Donation';
@ -20,7 +20,8 @@ export abstract class CreateDonation {
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
*/
@IsInt()
payedAmount: number;
@IsOptional()
payedAmount?: number;
/**
* Creates a new Donation entity from this.

View File

@ -1,4 +1,4 @@
import { IsInt, IsPositive } from 'class-validator';
import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { getConnection } from 'typeorm';
import { DonorNotFoundError } from '../../../errors/DonorErrors';
import { Donation } from '../../entities/Donation';
@ -27,7 +27,8 @@ export abstract class UpdateDonation {
* The donation's payed amount in the smalles unit of your currency (default: euro cent).
*/
@IsInt()
payedAmount: number;
@IsOptional()
payedAmount?: number;
/**
* Creates a new Donation entity from this.