Service - Product Attributes: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
Line 109: Line 109:
}
}
</syntaxhighlight>
</syntaxhighlight>
=== Relationships ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "hasProductAttributeLink",
nodeLabel: "productAttributePropertyName",
schema: {
schema: {
elementCanBeRemoved: true,
identifier: true,
allPropertiesImmutable: true,
restrictProperties: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
propertyId: {
identifier: true,
},
},
},
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "disabledProductAttributeLink",
nodeLabel: "productAttributePropertyValue",
schema: {
schema: {
elementCanBeRemoved: true,
identifier: true,
allPropertiesImmutable: true,
restrictProperties: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
propertyId: {
identifier: true,
},
},
},
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* creates a link in attribute tree between a Product or ProductAttributeLink, and a child ProductAttributeLink
 
=== Relationships ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "isProductAttribute",
relationshipType: "hasProductAttributeLink",
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 153: Line 157:
}
}
</syntaxhighlight>
</syntaxhighlight>
* links one ProductAttributeLink to one ProductAttribute
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "isProductLabel",
relationshipType: "disabledProductAttributeLink",
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 168: Line 170:
}
}
</syntaxhighlight>
</syntaxhighlight>
* links one ProductAttribute to one ProductAttributeLabel
* creates a link in attribute tree between a Product or ProductAttributeLink, and a child ProductAttributeLink


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "hasProductAttributeProperty",
relationshipType: "isProductAttribute",
schema: {
schema: {
elementCanBeRemoved: true,
elementCanBeRemoved: true,
Line 183: Line 185:
}
}
</syntaxhighlight>
</syntaxhighlight>
* ProductAttribute links to it's Properties
* links one ProductAttributeLink to one ProductAttribute
 
== [[Service - Translations Graph]]==
 
=== Nodes ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "productAttributeLabel",
relationshipType: "isProductLabel",
schema: {
schema: {
identifier: true,
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
properties: {
productAttributeId: {
originTimestamp: //timestamp the request to create/change this relationship was sent
identifier: true,
},
},
},
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* links one ProductAttribute to one ProductAttributeLabel


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "productAttributeValue",
relationshipType: "hasProductAttributeProperty",
schema: {
schema: {
identifier: true,
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
properties: {
productAttributeId: {
originTimestamp: //timestamp the request to create/change this relationship was sent
identifier: true,
},
},
},
}
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* ProductAttribute links to it's Properties


<syntaxhighlight lang="JavaScript">
== Basic node schemas ==
{
nodeLabel: "productAttributePropertyName",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true,
},
},
}
}
</syntaxhighlight>


<syntaxhighlight lang="JavaScript">
productAttribute
{
* [[Service - Media Graph]]
nodeLabel: "productAttributePropertyValue",
* [[Service - Translations Graph]]
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true,
},
},
}
}
</syntaxhighlight>


== Basic node schemas ==
productAttributeLabel
* [[Service - Translations Graph]]


=== productAttribute ===
productAttributePropertyName
* [[Service - Translations Graph]]


* [[Service - Media Graph]]
productAttributePropertyValue
* [[Service - Translations Graph]]


= Working documents =
= Working documents =

Revision as of 13:04, 10 August 2021

Overview

Manages Product Attributes and ProductAttributeLinks. Product Attributes can be shared by many Products, ProductAttributeLinks are used to create an attribute tree for one Product.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-product-attributes/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

..

LogicalResults

Stores results for any requests to perform logical searches on media links

{
	resultId: xxx // eg: filterMainId for a single logical element
	dataId: xxx // one productAttributeLinkId
}
  • partition key: resultId
  • sort key: dataId

Graph database

Service - Products Graph

Nodes

{
	nodeLabel: "productAttributeLabel",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			productAttributeLabelId: {
				identifier: true, //(random uuid)
			},
		},
	}
}
  • groups product attributes, eg: "colour", "size", etc..
{
	nodeLabel: "productAttribute",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			productAttributeId: {
				identifier: true, //(random uuid)
			},
		},
	}
}
  • one product attributes value inside one product label, eg: "green" under the "colour" label
{
	nodeLabel: "productAttributeLink",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			productAttributeLinkId: {
				identifier: true, //(random uuid)
			},
			productId: {
				immutable: true,
			},
			productAttributeId: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "productAttributeProperty",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			propertyId: {
				identifier: true, //(random uuid)
			},
			productAttributeId: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "productAttributePropertyName",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			propertyId: {
				identifier: true,
			},
		},
	}
}
{
	nodeLabel: "productAttributePropertyValue",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			propertyId: {
				identifier: true,
			},
		},
	}
}

Relationships

{
	relationshipType: "hasProductAttributeLink",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "disabledProductAttributeLink",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • creates a link in attribute tree between a Product or ProductAttributeLink, and a child ProductAttributeLink
{
	relationshipType: "isProductAttribute",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links one ProductAttributeLink to one ProductAttribute
{
	relationshipType: "isProductLabel",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links one ProductAttribute to one ProductAttributeLabel
{
	relationshipType: "hasProductAttributeProperty",
	schema: {
		elementCanBeRemoved: true,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • ProductAttribute links to it's Properties

Basic node schemas

productAttribute

productAttributeLabel

productAttributePropertyName

productAttributePropertyValue

Working documents

Product Attributes