Service - Unit Of Measure
Revision as of 13:44, 9 August 2023 by Sven the Barbarian (talk | contribs)
Not Needed
- DO NOT MAKE YET< MAY NOT BE NEEDED
- use Service - Transform Units calculatedProperties if making changes during Supply Stages
Overview
Manages units of measurement and their relationship to each other.
Repository
https://bitbucket.org/izara-core-shared/izara-core-shared-unit-of-measure
Graph database
Service - Core Graph
Nodes
{
nodeLabel: "{UnitOfMeasureLib.UNIT_OF_MEASURE_GRAPH_NODE_LABEL}", // "unitOfMeasure"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
unitOfMeasureId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
},
}
}
{
nodeLabel: "{UnitOfMeasureLib.UNIT_CONVERSION_GRAPH_NODE_LABEL}", // "unitConversionLink"
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
unitConversionLinkId: {
identifier: true, // create unique id from request params and uniqueMessageId
},
conversionRate: {},
},
}
}
Relationships
{
relationshipType: "{UnitOfMeasureLib.createPlacedOrderGraphRelationshipType()}", // "unitConversionFrom"
schema: {
immutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the order was made
},
}
}
{
relationshipType: "{UnitOfMeasureLib.createPlacedOrderGraphRelationshipType()}", // "unitConversionTo"
schema: {
immutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the order was made
},
}
}
- Links two unitOfMeasure nodes via a unitConversionLink relationship