Denhac / ApplicationAPI

4 stars 0 forks source link

Enhance data model for billing plans #12

Open stonaker opened 7 years ago

stonaker commented 7 years ago

Currently, the monthly cron'd invoicing program drives from values set in the members table. This creates issues with the family plan, where we currently shove two members into the same members row, so that they can bill together.

Changes needed:

  1. Create new table, billing_account, fields (id, name, billing_amount)
  2. Create new field in members table: billing_account_id
  3. Modify the invoicing program to bill based on billing account table instead of member table
  4. Manually create separate rows for members currently on a family plan (including separating out the prox card IDs, in particular)

... and other related stuff as I discover it

radioboyQ commented 7 years ago

Justin had a good idea on how to track families.

It really just boils down to using a member data table, combining that data in a family table and tracking the changes of those two in their own logging tables, one for family and one for individuals.

stonaker commented 7 years ago

a member data table <-- we have one combining that data in a family table <-- that's what I mean by billing_account table in their own logging tables <-- not needed; we have application logging already built in; we can log it there