InsertTickets tests pass while creating the new entities

This commit is contained in:
Eric Schultz 2021-02-02 16:47:00 -06:00 committed by Eric Schultz
parent 09b5edaaf8
commit 6c233bc2f9
3 changed files with 36 additions and 10 deletions

View file

@ -1,10 +0,0 @@
// License: LGPL-3.0-or-later
import type { Amount, HoudiniObject, IdType, HouID } from "../common";
import type Nonprofit from './';
export interface Transaction extends HoudiniObject<HouID> {
amount: Amount;
nonprofit: IdType | Nonprofit;
object: 'transaction';
}

View file

@ -0,0 +1,16 @@
// License: LGPL-3.0-or-later
import type { Amount, HoudiniObject, IdType, HouID } from "../../common";
import type Nonprofit from '../';
import type Supporter from "../Supporter";
import type Transaction from './';
export interface Payment extends HoudiniObject<HouID> {
amount: Amount;
nonprofit: IdType | Nonprofit;
object: 'payment';
supporter: IdType | Supporter;
transaction: HouID | Transaction;
}

View file

@ -0,0 +1,20 @@
// License: LGPL-3.0-or-later
import type { Amount, HoudiniObject, IdType, HouID } from "../../common";
import type Nonprofit from '../';
import type Supporter from "../Supporter";
import type { Payment } from "./Payment";
export default interface Transaction extends HoudiniObject<HouID> {
amount: Amount;
nonprofit: IdType | Nonprofit;
object: 'transaction';
payments: IdType[] | Payment[];
status: "not-submitted"|"created" | "waiting-on-supporter" | "failed" | "completed";
supporter: IdType | Supporter;
/**
* We don't specify more for now
*/
transaction_assignments: { id: HouID,object: string }[];
}
export * from './Payment';