From 42911ace2caf32fd39577239479779834053a81f Mon Sep 17 00:00:00 2001 From: root <Yorgo EL MOUBAYED> Date: Tue, 11 May 2021 00:05:38 +0200 Subject: [PATCH] Create beamline params model --- dataproc/api/models/beamlineparams_model.py | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dataproc/api/models/beamlineparams_model.py diff --git a/dataproc/api/models/beamlineparams_model.py b/dataproc/api/models/beamlineparams_model.py new file mode 100644 index 0000000..2e941f9 --- /dev/null +++ b/dataproc/api/models/beamlineparams_model.py @@ -0,0 +1,28 @@ +# Python imports +from uuid import uuid4 + +# Third-party imports +from neomodel import StructuredNode, StringProperty, IntegerProperty, UniqueIdProperty, RelationshipTo + +class BeamlineParams(StructuredNode): + + """ + Defines node properties and relationships + Provides data serializer + """ + + # Properties + uuid=StringProperty(unique_index=True, default=uuid4) + + @property + def serialize(self): + + """ + Serializer for node properties + """ + + return { + 'BeamlineParams_node_properties': { + 'uuid': self.uuid, + }, + } \ No newline at end of file -- GitLab