I added 2 new tables: group_transactions and transactions. The workflow is as follows:
To clear a group you call POST /group/{id}/transaction with with id = group ID. All bills (and associations of a bill) get deleted. A new group_transaction is created with a date and potentially multiple transaction entries. Transactions store the creditor, debtor and an amount. This way we can get this data whenever we want.
With GET /group/transaction and query param userId, one can get all transactions for every group where the given user is member of (this is needed for our new screen in frontend).
I added 2 new tables:
group_transactions
andtransactions
. The workflow is as follows:To clear a group you call
POST /group/{id}/transaction
with with id = group ID. All bills (and associations of a bill) get deleted. A newgroup_transaction
is created with a date and potentially multipletransaction
entries. Transactions store the creditor, debtor and an amount. This way we can get this data whenever we want.With
GET /group/transaction
and query paramuserId
, one can get all transactions for every group where the given user is member of (this is needed for our new screen in frontend).Closes #155