Skip to content
Snippets Groups Projects
Commit 16874a50 authored by Jörn Künsemöller's avatar Jörn Künsemöller
Browse files

Task LSMR-13: Added work request relation + blueprint models

parent 7e59f87f
No related branches found
No related tags found
1 merge request!87Lsmr epic
...@@ -194,3 +194,30 @@ class Run(SystemDefinedCommon): ...@@ -194,3 +194,30 @@ class Run(SystemDefinedCommon):
do_cancel = BooleanField() do_cancel = BooleanField()
template = ForeignKey(RunTemplate, on_delete=SET_NULL, null=True) template = ForeignKey(RunTemplate, on_delete=SET_NULL, null=True)
blueprint = ForeignKey(RunBlueprint, related_name='related_runs', on_delete=CASCADE) blueprint = ForeignKey(RunBlueprint, related_name='related_runs', on_delete=CASCADE)
class WorkRequestBlueprint(UserDefinedCommon):
# todo
pass
class WorkRequest(SystemDefinedCommon):
# todo
pass
class WorkRequestRelationBlueprint(UserDefinedCommon):
selection_doc = JSONField()
dataformat = CharField(max_length=30,
choices=[(item.name, item.value) for item in DataformatChoice])
producer = ForeignKey(WorkRequestBlueprint, related_name='work_request_relation_blueprint_producer', on_delete=CASCADE)
consumer = ForeignKey(WorkRequestBlueprint, related_name='work_request_relation_blueprint_consumer', on_delete=CASCADE)
class WorkRequestRelation(SystemDefinedCommon):
selection_doc = JSONField()
dataformat = CharField(max_length=30,
choices=[(item.name, item.value) for item in DataformatChoice])
producer = ForeignKey(WorkRequest, related_name='work_request_relation_producer', on_delete=CASCADE)
consumer = ForeignKey(WorkRequest, related_name='work_request_relation_consumer', on_delete=CASCADE)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment