3 ms·
This is just the ledger table. In your case you would have a payment event table with one row and a join table that connects that event with all the ledger rows
by skipants 4y ago
This is just the ledger table. In your case you would have a payment event table with one row and a join table that connects that event with all the ledger rows.
That's what Airbnb seems to do: https://medium.com/airbnb-engineering/tracking-the-money-scaling-financial-reporting-at-airbnb-6d742b80f040 https://medium.com/airbnb-engineering/tracking-the-money-sca...
- zie 4y agoOr just go full double entry and allow multiple accounts per transaction, which is what anyone with an accounting degree would tell you to do. The bonus of doing it this way, everyone with an accounting degree won't gasp in horror when they understand what it is you did. The events table in your example is basically the same as a transaction table and dump the transaction_id into the ledger table. The bonus of doing it with a 'transaction_id' is accountants, auditors and the rest won't be confused.