16
src/models/FixedDonation.ts
Normal file
16
src/models/FixedDonation.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { IsInt, IsPositive } from "class-validator";
|
||||
import { Donation } from "./Donation";
|
||||
|
||||
/**
|
||||
* Defines the FixedDonation entity.
|
||||
* In the past there was no easy way to track fixed donations (eg. for creating donation receipts).
|
||||
*/
|
||||
export class FixedDonation extends Donation {
|
||||
|
||||
/**
|
||||
* The donation's amount in cents (or whatever your currency's smallest unit is.).
|
||||
*/
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
amount: number;
|
||||
}
|
||||
Reference in New Issue
Block a user