Skip to content
Snippets Groups Projects
Verified Commit 92987e3e authored by Jan Loewe's avatar Jan Loewe :speech_balloon:
Browse files

feat(item): add itemQuantities

parent 0f4caf24
Branches
Tags
1 merge request!4Update to DCC Schema V3.2
......@@ -484,16 +484,15 @@ export class ContactNotStrictType extends DCCXMLElement {
/** List of values which describes the measurement equipment. */
export class MeasuringEquipmentQuantityListType extends DCCXMLElement {
measuringEquipmentQuantity: MeasuringEquipmentQuantityType[];
measuringEquipmentQuantity: PrimitiveQuantityType[];
constructor(el: Partial<MeasuringEquipmentQuantityListType> = {}) {
super(el);
this.measuringEquipmentQuantity = ensureArray(el.measuringEquipmentQuantity).map((x) => new MeasuringEquipmentQuantityType(x));
this.measuringEquipmentQuantity = ensureArray(el.measuringEquipmentQuantity).map((x) => new PrimitiveQuantityType(x));
}
}
/** Value which describes the measuringEquipment */
export class MeasuringEquipmentQuantityType extends DCCXMLElement {
export class PrimitiveQuantityType extends DCCXMLElement {
_attr: IIdAndRefIdAndRefTypeAttributes;
name?: TextType;
......@@ -636,7 +635,7 @@ export class MeasuringEquipmentQuantityType extends DCCXMLElement {
// endregion choice
constructor(el: Partial<MeasuringEquipmentQuantityType> = {}) {
constructor(el: Partial<PrimitiveQuantityType> = {}) {
super(el);
if (el.name) this.name = new TextType(el.name);
if (el.description) this.description = new RichContentType(el.description);
......@@ -662,6 +661,7 @@ export class ItemType extends DCCXMLElement {
manufacturer: ContactNotStrictType;
model?: DCCXMLElement;
identifications: IdentificationListType;
itemQuantities: ItemQuantityListType;
constructor(el: Partial<ItemType> = {}) {
super(el);
......@@ -672,6 +672,17 @@ export class ItemType extends DCCXMLElement {
this.manufacturer = new ContactNotStrictType(el.manufacturer);
if (el.model) this.model = new DCCXMLElement(el.model);
this.identifications = new IdentificationListType(el.identifications);
if (el.itemQuantities) this.itemQuantities = new ItemQuantityListType(el.itemQuantities);
}
}
/** List of value(s) which belongs to the to be calibrated item. */
export class ItemQuantityListType extends DCCXMLElement {
itemQuantity: PrimitiveQuantityType[];
constructor(el: Partial<ItemQuantityListType> = {}) {
super(el);
this.itemQuantity = ensureArray(el.itemQuantity).map((x) => new PrimitiveQuantityType(x));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment