I have a schema containing contracts, sub-contracts, services offered by each of those, and sub-services.
I also have an application that allows me to extend the duration of the contract and to modify data on the services and sub-services.
I've been thinking about the best way to keep track of the extension and I've found these solutions which I'm not happy about:
- creating an object that contains all the fields updated, this isn't very dynamic since services and sub-services can change.
- creating an object connected to clones of contract, sub-contract, services, sub-services... but this would create a lot of records.
- saving all the data in an object's field as a json or as a pdf document, but this doesn't allow me to make queries if I want to make a report later.
Is there a pattern or better way to do this?
PS: The application sends a request to an external service to update those fields which will be updated after being given the OK, so in the meantime, I have to save the fields and values that have to be updated.