Service - Unit Of Measure: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(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...")
 
No edit summary
 
Line 1: Line 1:
= Not Needed =
* DO NOT MAKE YET< MAY NOT BE NEEDED
* use [[Service - Transform Units]] calculatedProperties if making changes during Supply Stages
= Overview =
= Overview =



Latest revision as of 13:44, 9 August 2023

Not Needed

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

Working documents

Unit Of Measure