@@ -3,6 +3,7 @@ import {
|
||||
IsNotEmpty
|
||||
} from "class-validator";
|
||||
import { Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
|
||||
import { ResponseDonation } from '../responses/ResponseDonation';
|
||||
import { Donor } from './Donor';
|
||||
|
||||
/**
|
||||
@@ -31,12 +32,13 @@ export abstract class Donation {
|
||||
* The donation's amount in cents (or whatever your currency's smallest unit is.).
|
||||
* The exact implementation may differ for each type of donation.
|
||||
*/
|
||||
abstract amount: number;
|
||||
public abstract get amount(): number;
|
||||
|
||||
|
||||
/**
|
||||
* Turns this entity into it's response class.
|
||||
*/
|
||||
public toResponse() {
|
||||
return new Error("NotImplemented");
|
||||
public toResponse(): ResponseDonation {
|
||||
return new ResponseDonation(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user