The idea is that the user's component inventory should keep the last 500 changes as personal history, so if a user makes a mistake, it's easy to see what they changed and correct it. I think the best approach might be to build this with the Django JSONField model field. The main inventory could still be maintained with the relational tables. But every change to the user's component inventory could be logged with a timestamp in a JSONfield (inventory_history or whatever).
The tricky part of course is writing the logic allowing a user to "restore" the inventory to a previous state or diff a previous state with the current state.
The idea is that the user's component inventory should keep the last 500 changes as personal history, so if a user makes a mistake, it's easy to see what they changed and correct it. I think the best approach might be to build this with the Django JSONField model field. The main inventory could still be maintained with the relational tables. But every change to the user's component inventory could be logged with a timestamp in a JSONfield (
inventory_history
or whatever).The tricky part of course is writing the logic allowing a user to "restore" the inventory to a previous state or diff a previous state with the current state.