Skip to content
Snippets Groups Projects
construct_model.py 747 B
Newer Older
from neomodel import StructuredNode, StringProperty, IntegerProperty,UniqueIdProperty, RelationshipTo
root's avatar
root committed
from uuid import uuid4

# from api.models.ocf_model import OCF
# from api.models.storagehost_model import StorageHost
# from api.models.computinghost_model import ComputingHost
# from api.models.user_model import User

class Construct(StructuredNode):
	
root's avatar
root committed
	uuid=StringProperty(unique_index=True, default=uuid4)
	name=StringProperty()
	
	# Relationships
	has_ocf=RelationshipTo('api.models.ocf_model.OCF', 'HAS')
	has_storage_host=RelationshipTo('api.models.storagehost_model.StorageHost', 'HAS')
	has_computing_host=RelationshipTo('api.models.computinghost_model.ComputingHost', 'HAS')
	has_user=RelationshipTo('api.models.user_model.User', 'HAS')