From 8d61c1ef4bf7b3c11ee0795c8ba7dccec31cbff0 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 22 Jun 2020 10:20:54 +0100 Subject: [PATCH] Add description of SerialisedModel --- app/serialised_models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/serialised_models.py b/app/serialised_models.py index d3b1cd5ca..f864171f7 100644 --- a/app/serialised_models.py +++ b/app/serialised_models.py @@ -5,6 +5,14 @@ from app.dao import templates_dao class SerialisedModel(ABC): + """ + A SerialisedModel takes a dictionary, typically created by + serialising a database object. It then takes the value of specified + keys from the dictionary and adds them to itself as properties, so + that it can be interacted with like a normal database model object, + but with no risk that it will actually go back to the database. + """ + @property @abstractmethod def ALLOWED_PROPERTIES(self):