Service - Unit Of Measure
Revision as of 05:47, 6 August 2023 by Sven the Barbarian (talk | contribs) (Created page with "= 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 === <syntaxhighlight lang="JavaScript"> { nodeLabel: "{UnitOfMeasureLib.UNIT_OF_MEASURE_GRAPH_NODE_LABEL}", // "unitOfMeasure" schema: { identifier: true, restrictProperties: true, restrictRelationships: true, properties: { u...")
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