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