- customer has many transactions
- transactions can be payments or purchases
- transaction fields: [ customer_id, created_at, amount, transaction_type ]
- purchases has many line_items
- line_item fields: [ name, color, size, cost, price, qty: { default: 1}, item_total ]
- customer has one balance ( difference between purchases and payments )
Reset option
- customer transactions are not preserved forever
- admin settings include a 'reset transaction data' feature that will delete