fix(donations): Move donor over to the types that need it
This commit is contained in:
parent
9875b4f392
commit
7697acff82
@ -1,4 +1,5 @@
|
||||
import { IsInt, IsOptional, IsPositive } from 'class-validator';
|
||||
import { Exclude } from 'class-transformer';
|
||||
import { IsInt, IsOptional } from 'class-validator';
|
||||
import { getConnection } from 'typeorm';
|
||||
import { Donation } from '../../entities/Donation';
|
||||
import { Donor } from '../../entities/Donor';
|
||||
@ -7,13 +8,7 @@ import { Donor } from '../../entities/Donor';
|
||||
* This class is used to create a new Donation entity from a json body (post request).
|
||||
*/
|
||||
export abstract class CreateDonation {
|
||||
/**
|
||||
* The donation's associated donor's id.
|
||||
* This is important to link donations to donors.
|
||||
*/
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
@IsOptional()
|
||||
@Exclude()
|
||||
donor: number;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user