diff --git a/src/models/FixedDonation.ts b/src/models/FixedDonation.ts new file mode 100644 index 0000000..e429ddf --- /dev/null +++ b/src/models/FixedDonation.ts @@ -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; +} \ No newline at end of file