fix: Bug fix the versioning of initial record and its snapshot - which is missing in current version history
🐛 Bug Report
Describe the bug
The versioning system does not store the initial state of a record.
Currently, the first edit is recorded as Version 1, but it does not include a snapshot of the original data, resulting in an incomplete version history.
To Reproduce
Steps to reproduce the behavior:
- Edit the record.
- Check the version history. (check in swagger docs for route /record/{record-id}/history or in inspect tool in browser)
- Observe that Version 1 only contains the new changes, with no stored baseline version except in the field level changes in it which contains the old value for initial version.
Expected behavior
The system should store the initial state of the record as the first version (Version 0 or Version 1), ensuring complete auditability and allowing reconstruction of the original data.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- OS: [e.g. iOS, Windows, Linux]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
📌 Follow semantic issue titling convention:<type>(<scope>): <description>(e.g.,fix(auth): resolve jwt token expirationorchore(deps): update dependencies).