Service - Unit Standard: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 67: | Line 67: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* links a standard unit to a unit type | * links a standard unit to a unit type | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
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 | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
* If UnitType has set isCurrency=true, all Units of that UnitType will have a link to a currency node | |||
= Working documents = | = Working documents = |
Revision as of 08:19, 6 August 2023
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