A Document has the following fields:
- type string The type of the document. Can be any arbitrary value.
- reference string A reference to the document. Can be any arbitrary value.
- contents JSON object Any arbitrary JSON object with the actual contents of the document.
A Document should be unique based on a combination of type and reference. So, there can never be two items with the same type and reference. If you try to do that, the previous item with the same type and reference will be replaced, instead of another one being added.
You can have multiple items of the same type, and you can also have multiple of the same reference, but with a different type.
Updated about 2 years ago