deepset-ai / COVID-QA

API & Webapp to answer questions about COVID-19. Using NLP (Question Answering) and trusted data sources.
Apache License 2.0
343 stars 119 forks source link

Add document aggregate class for document page #136

Open RomanKova opened 3 years ago

RomanKova commented 3 years ago

Document class is made following the aggregate pattern of DDD. The Answer and Question objects are not exposed outside and all modifications are done through the Document object to prevent Data Integrity. A version for document has been introduced which will solve the concurrency issues that could arise while updating two documents at the same time.