Skip to content
Snippets Groups Projects
statisticalreport_model.py 576 B
Newer Older
root's avatar
root committed
# Python imports
root's avatar
root committed
from uuid import uuid4
root's avatar
root committed
# Third-party imports
from neomodel import StructuredNode, StringProperty, IntegerProperty, UniqueIdProperty, RelationshipTo

class StatisticalReport(StructuredNode):
root's avatar
root committed
	
	"""
	Defines node properties and relationships
	Provides data serializer
	"""

	# Properties
root's avatar
root committed
	uuid=StringProperty(unique_index=True, default=uuid4)
	report_name=StringProperty()

	@property
	def serialize(self):

		"""
		Serializer for node properties
		"""
		
root's avatar
root committed
		return {
			'node_properties': {
				'uuid': self.uuid,
				'report_name': self.report_name,
			},
		}