Skip to content

Commit 11ab1ae

Browse files
committed
Add more classes as examples for the instrument
1 parent f36d3a0 commit 11ab1ae

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

bam_data_store/datamodel/object_type.py

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ class Instrument(ObjectType):
1212
generated_code_prefix='INS',
1313
)
1414

15+
name = PropertyTypeAssignment(
16+
version=1,
17+
code='$NAME',
18+
data_type='VARCHAR',
19+
property_label='Name',
20+
description="""
21+
Name
22+
""",
23+
mandatory=True,
24+
show_in_edit_views=True,
25+
section='General information',
26+
)
27+
1528
alias = PropertyTypeAssignment(
1629
version=1,
1730
code='ALIAS',
@@ -22,5 +35,43 @@ class Instrument(ObjectType):
2235
""",
2336
mandatory=False,
2437
show_in_edit_views=True,
25-
section='General',
38+
section='General information',
39+
)
40+
41+
# ... other property types here...
42+
43+
44+
class WeldingEquipment(Instrument):
45+
defs = ObjectTypeDef(
46+
version=1,
47+
code='INSTRUMENT.WELDING_EQUIPMENT',
48+
description="""
49+
Generic Welding Equipment//Unspezifisches Schweiß-Equipment
50+
""",
51+
generated_code_prefix='INS.WLD_EQP',
52+
)
53+
54+
55+
class GMAWTorch(WeldingEquipment):
56+
defs = ObjectTypeDef(
57+
version=1,
58+
code='INSTRUMENT.WELDING_EQUIPMENT.GMAW_TORCH',
59+
description="""
60+
Arc welding torch for gas metal arc welding (GMAW) applications//Schweißbrenner für Metall-Schutzgas-Schweißen (MSG-Schweißen)
61+
""",
62+
generated_code_prefix='INS.WLD_EQP.GMAW_TRCH',
63+
)
64+
65+
torch_type = PropertyTypeAssignment(
66+
version=1,
67+
code='WELDING.TORCH_TYPE',
68+
data_type='CONTROLLED_VOCABULARY',
69+
vocabulary_code='WELDING.GMAW_TORCH_TYPE', # ? use only the class name?
70+
property_label='Type',
71+
description="""
72+
type of welding torch//Art des Schweißbrenners
73+
""",
74+
mandatory=True,
75+
show_in_edit_views=True,
76+
section='General information',
2677
)

0 commit comments

Comments
 (0)