diff --git a/src/models/entities/Donation.ts b/src/models/entities/Donation.ts index 1dd023d..ef66b65 100644 --- a/src/models/entities/Donation.ts +++ b/src/models/entities/Donation.ts @@ -2,7 +2,7 @@ import { IsInt, IsNotEmpty } from "class-validator"; -import { Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm"; +import { Column, Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm"; import { ResponseDonation } from '../responses/ResponseDonation'; import { Donor } from './Donor'; @@ -34,6 +34,13 @@ export abstract class Donation { */ public abstract get amount(): number; + /** + * The donation's payed amount in cents (or whatever your currency's smallest unit is.). + * Used to mark donations as payed. + */ + @Column({ nullable: true }) + @IsInt() + payedAmount: number; /** * Turns this entity into it's response class.