2021-02-08 20:55:31 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2021-02-10 22:04:05 +00:00
|
|
|
import type { Amount, HoudiniObject, IDType, HouID, HoudiniEvent } from "../../common";
|
2021-02-08 20:55:31 +00:00
|
|
|
import type Nonprofit from '../';
|
|
|
|
import type Supporter from "../Supporter";
|
|
|
|
import type Transaction from './';
|
|
|
|
|
|
|
|
interface Dedication {
|
|
|
|
contact?: {
|
|
|
|
address?: string;
|
|
|
|
email?: string;
|
|
|
|
phone?: string;
|
|
|
|
};
|
|
|
|
name: string;
|
|
|
|
note?: string;
|
|
|
|
type: 'honor' | 'memory';
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Donation extends HoudiniObject<HouID> {
|
|
|
|
amount: Amount;
|
|
|
|
dedication?: Dedication | null;
|
|
|
|
designation?: string | null;
|
2021-02-10 22:04:05 +00:00
|
|
|
nonprofit: IDType | Nonprofit;
|
2021-02-08 20:55:31 +00:00
|
|
|
object: 'donation';
|
2021-02-10 22:04:05 +00:00
|
|
|
supporter: IDType | Supporter;
|
2021-02-08 20:55:31 +00:00
|
|
|
transaction: HouID | Transaction;
|
|
|
|
}
|
|
|
|
|
|
|
|
export type DonationCreated = HoudiniEvent<'donation.created', Donation>;
|
|
|
|
export type DonationUpdated = HoudiniEvent<'donation.updated', Donation>;
|
|
|
|
export type DonationDeleted = HoudiniEvent<'donation.deleted', Donation>;
|