Service - Delivery Method Standard

From Izara Wiki
Revision as of 13:04, 21 October 2021 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Handler service for basic delivery methods that use Service - Delivery Method Rate Table for pricing. = Repository = https://bitbucket.org/izara-market-pro...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Handler service for basic delivery methods that use Service - Delivery Method Rate Table for pricing.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-delivery-method-standard

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "DeliveryMethodHandlerServiceNameTag"
	configKey: "DeliveryMethodHandlerServiceNameTag"
	configValue: xxx // this own services ServiceNameTag, eg "DeliveryMethodStandard"
}
{
	configTag: "ProductGraphServiceName"
	configKey: "ProductGraphServiceName"
	configValue: xxx // eg: "ProductGraph"
}
{
	configTag: "DeliveryMethodManagerServiceName"
	configKey: "DeliveryMethodManagerServiceName"
	configValue: xxx // eg: "DeliveryMethodManager"
}
{
	configTag: "DeliveryMethodRateTableServiceName"
	configKey: "DeliveryMethodRateTableServiceName"
	configValue: xxx // eg: "DeliveryMethodRateTable"
}

Graph database

Service - Products Graph

Nodes

{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}", // "deliveryMethod"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			deliveryMethodId: {
				identifier: true, // create unique id from translation
			},
			deliveryMethodHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}
{
	nodeLabel: "{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}

Relationships

{
	relationshipType: "{DeliveryMethodStandardLib.createfromLocationNodeRelationshipType()}", // "from_LocationNode"
	schema: {
		elementCanBeRemoved: false,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{DeliveryMethodStandardLib.createHasDeliveryMethodRateTableGraphRelationshipType()}", // "has_deliveryMethodRateTable"
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "has_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}
{
	relationshipType: "disabled_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}Property",
}
{
	relationshipType: "is_{DeliveryMethodStandardLib.DELIVERYMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
}
{
	relationshipType: "has_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
}
{
	relationshipType: "disabled_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
}
{
	relationshipType: "is_{DeliveryMethodStandardLib.DELIVERYMETHOD_SALE_PROPERTIES_GRAPH_TAG}PropertyLabel",
}

Basic node schemas

Schema comes from BasicNodeSchemaLib

  1. deliveryMethodPropertyLabel
  2. deliveryMethodProperty
  3. deliveryMethodSalePropertyLabel
  4. deliveryMethodSaleProperty

Data structure notes

  • Users can create new deliveryMethods which are uniquely identified by their translation
  • Users can create userPaymentMethod nodes for their account which connect to deliveryMethods, one user can have multiple userPaymentMethod links to the same deliveryMethod, eg different Bank Transfer nodes for different bank accounts, which can be applied to sell offers in any combination

Working documents

Delivery Method Standard