Skip to content
Snippets Groups Projects
scalepackfile_model.py 569 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 ScalepackFile(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)
	rsf_filetype=StringProperty()

	@property
	def serialize(self):

		"""
		Serializer for node properties
		"""
		
		return {
		'node_properties': {
		'uuid': self.uuid,
		'rsf_filetype': self.rsf_filetype,
		},
		}