4 ms·
Those "id" names are really confusing; I assume they are all shorthand for "acct_id", or... maybe not. I think account_credit & account_debit need foreign keys
by kerblang 4y ago
Those "id" names are really confusing; I assume they are all shorthand for "acct_id", or... maybe not.
I think account_credit & account_debit need foreign keys back to billing_account, and they probably are gonna need their own primary columns eventually (so you can add on addl metadata like 3rd party transaction tracking).
I'm not sure what billing_rate's relationship is to billing_account, if any...
- punkpeye 4y agoI missed `billing_account_id` in `account_credit` and `account_debit`. Corrected. There can be multiple billing rates (that change over time). `billing_account` is assigned reference to whatever is accurate at the time.