Added finxed donations

ref #11
This commit is contained in:
Nicolai Ort 2020-12-01 17:53:43 +01:00
parent 6c32a9ebe9
commit deae0bb84b
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import { Entity, Column } from "typeorm";
import { IsInt, IsPositive,} from "class-validator";
import { Donation } from "./Donation";
/**
* Defines a fixed donation.
*/
@Entity()
export class FixedDonation extends Donation {
/**
* The donation's amount in cents (or whatever your currency's smallest unit is.).
*/
@Column()
@IsInt()
@IsPositive()
amount: number;
}