restructure machine data
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
from mongoengine import *
|
|
||||||
|
|
||||||
|
|
||||||
class MachineBase(Document):
|
|
||||||
|
|
||||||
name = StringField(default=None)
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
'allow_inheritance': True,
|
|
||||||
'index_opts': {},
|
|
||||||
'index_background': True,
|
|
||||||
'index_cls': False,
|
|
||||||
'auto_create_index': True,
|
|
||||||
'collection': 'infrastructure',
|
|
||||||
"db_alias": 'dblabtests',
|
|
||||||
}
|
|
||||||
@@ -2,14 +2,14 @@ import datetime
|
|||||||
|
|
||||||
from mongoengine import *
|
from mongoengine import *
|
||||||
|
|
||||||
from paveit.datamodels import (
|
from paveit.helper import fetch_recursive, mongo_to_dict
|
||||||
|
|
||||||
|
from .components import (
|
||||||
ComponentsServoHydraulicMachineKMD,
|
ComponentsServoHydraulicMachineKMD,
|
||||||
ComponentsServoHydraulicMachineLVDT,
|
ComponentsServoHydraulicMachineLVDT,
|
||||||
ComponentsServoHydraulicMachineTemperatureControl,
|
ComponentsServoHydraulicMachineTemperatureControl,
|
||||||
Labtest,
|
|
||||||
)
|
)
|
||||||
from paveit.helper import fetch_recursive, mongo_to_dict
|
from .enumeration import Labtest
|
||||||
|
|
||||||
from .usermanagement import Organisation
|
from .usermanagement import Organisation
|
||||||
|
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ class Experiment(EmbeddedDocument):
|
|||||||
config = ListField(StringField(), required=True)
|
config = ListField(StringField(), required=True)
|
||||||
|
|
||||||
|
|
||||||
class Machine(Document):
|
class MachineBase(Document):
|
||||||
|
|
||||||
company = StringField(required=True)
|
company = StringField(required=True)
|
||||||
name = StringField(required=True)
|
name = StringField(required=True)
|
||||||
@@ -71,5 +71,6 @@ class Machine(Document):
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
class ServoHydraulicMachine(Machine):
|
class ServoHydraulicMachine(MachineBase):
|
||||||
|
|
||||||
pass
|
pass
|
||||||
Reference in New Issue
Block a user