fix(donations): Move donor over to the types that need it

This commit is contained in:
Nicolai Ort 2025-04-28 19:25:41 +02:00
parent 9875b4f392
commit 7697acff82
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -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;
/**