Skip to content
Snippets Groups Projects
datacollection_model.py 539 B
Newer Older
from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo

root's avatar
root committed
from api.models.dataset_model import Dataset

class DataCollection (StructuredNode):
root's avatar
root committed
	collection_type=StringProperty()
	collection_size=StringProperty()
root's avatar
root committed
	# Relationships
	generates=RelationshipTo(Dataset, 'GENERATES')
root's avatar
root committed
	@property
	def serialize(self):
root's avatar
root committed
		"""
		Serializer for node properties
		"""
		
		return {
			'node_properties': {
				'collection_type': self.collection_type,
				'collection_size': self.collection_size,
			},
		}