lab-64 / split-the-bill-server

Backend for the Split the Bill App
4 stars 0 forks source link

155: Revisit clear debts feature #178

Closed GR0ZA closed 4 months ago

GR0ZA commented 4 months ago

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).

Closes #155

f-odc commented 4 months ago

Good Job :+1: