Service - Unit Standard

From Izara Wiki
Jump to navigation Jump to search

Overview

Handler service for the standard unit that tracks a single item.

Repository

https://bitbucket.org/izara-supply-units/izara-supply-units-unit-standard

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "SupplyGraphServiceName"
	configKey: "SupplyGraphServiceName"
	configValue: xxx // eg: "SupplyGraph"
}
{
	configTag: "UnitManagerServiceName"
	configKey: "UnitManagerServiceName"
	configValue: xxx // eg: "UnitManager"
}

LogicalResults

Standard LogicalResults Per Service

Graph database

Service - Supply Graph

Nodes

Versioned data

unitSettings

{
	properties: {
		// some are controlled by unitType, others can be added as needed case by case, not controlled
	},
}

Relationships

{
	relationshipType: "{unitStandardLib.IS_UNITTYPE_GRAPH_REL_TYPE}", // "is_unitType"
	schema: {
		elementCanBeRemoved: false,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links a standard unit to a unit type
{
	relationshipType: "{unitStandardLib.UNIT_IS_CURRENCY_GRAPH_REL_TYPE}", // "unitIs_currency"
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • If UnitType has set isCurrency=true, all Units of that UnitType will have a link to a currency node

Working documents

Unit Standard