Service - Product Attributes: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 93: | Line 93: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
nodeLabel: " | nodeLabel: "productAttributePropertyLabel", | ||
schema: { | schema: { | ||
identifier: true, | identifier: true, | ||
Line 100: | Line 100: | ||
properties: { | properties: { | ||
propertyId: { | propertyId: { | ||
identifier | identifier: true, | ||
}, | }, | ||
}, | }, | ||
Line 112: | Line 109: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
nodeLabel: " | nodeLabel: "productAttributeProperty", | ||
schema: { | schema: { | ||
identifier: true, | identifier: true, | ||
Line 119: | Line 116: | ||
properties: { | properties: { | ||
propertyId: { | propertyId: { | ||
identifier: true, | identifier: true, //(random uuid) | ||
}, | }, | ||
productAttributeId: { | |||
immutable: true, | |||
}, | }, | ||
}, | }, | ||
Line 229: | Line 213: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* links a ProductAttribute node to it's Properties | * links a ProductAttribute node to it's Properties | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
relationshipType: "isProductAttributePropertyLabel", | |||
schema: { | |||
elementCanBeRemoved: true, | |||
allPropertiesImmutable: true, | |||
restrictProperties: true, | |||
properties: { | |||
originTimestamp: //timestamp the request to create/change this relationship was sent | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
* links one ProductAttributeProperty to one ProductAttributePropertyLabel | |||
== Basic node schemas == | == Basic node schemas == | ||
Line 239: | Line 238: | ||
* [[Service - Translations Graph]] | * [[Service - Translations Graph]] | ||
productAttributePropertyLabel | |||
* [[Service - Translations Graph]] | * [[Service - Translations Graph]] | ||
productAttributeProperty | |||
* [[Service - Translations Graph]] | * [[Service - Translations Graph]] | ||
Revision as of 13:24, 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: "productAttributePropertyLabel",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true,
},
},
}
}
{
nodeLabel: "productAttributeProperty",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true, //(random uuid)
},
productAttributeId: {
immutable: 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: "isProductAttributeLabel",
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
},
}
}
{
relationshipType: "disabledProductAttributeProperty",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
- links a ProductAttribute node to it's Properties
{
relationshipType: "isProductAttributePropertyLabel",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
- links one ProductAttributeProperty to one ProductAttributePropertyLabel
Basic node schemas
productAttributeLabel
productAttribute
productAttributePropertyLabel
productAttributeProperty