Service - Product Attributes: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= Overview = Manages Product Attributes and ProductAttributeLinks. Product Attributes can be shared by many Products, ProductAttributeLinks are used to create an attribute tr...") |
No edit summary |
||
Line 91: | Line 91: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Relationships === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
relationshipType: "hasProductAttribute", | |||
schema: { | |||
elementCanBeRemoved: true, | |||
allPropertiesImmutable: true, | |||
restrictProperties: true, | |||
properties: { | |||
originTimestamp: //timestamp the request to create/change this relationship was sent | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
relationshipType: "disabledProductAttribute", | |||
schema: { | |||
elementCanBeRemoved: true, | |||
allPropertiesImmutable: true, | |||
restrictProperties: true, | |||
properties: { | |||
originTimestamp: //timestamp the request to create/change this relationship was sent | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
* creates a link in attribute tree between a Product or ProductAttribute, and a child ProductAttribute | |||
== [[Service - Translations Graph]]== | == [[Service - Translations Graph]]== | ||
=== Nodes === | === Nodes === | ||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
nodeLabel: "productAttributeName", | |||
schema: { | |||
identifier: true, | |||
restrictProperties: true, | |||
restrictRelationships: true, | |||
properties: { | |||
productAttributeId: { | |||
identifier: true, | |||
}, | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
nodeLabel: "productAttributeValue", | |||
schema: { | |||
identifier: true, | |||
restrictProperties: true, | |||
restrictRelationships: true, | |||
properties: { | |||
productAttributeId: { | |||
identifier: true, | |||
}, | |||
}, | |||
} | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> |
Revision as of 11:30, 8 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: "productAttribute",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
productAttributeId: {
identifier: true, //(random uuid)
},
},
}
}
{
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,
},
},
}
}
Relationships
{
relationshipType: "hasProductAttribute",
schema: {
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
{
relationshipType: "disabledProductAttribute",
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 ProductAttribute, and a child ProductAttribute
Service - Translations Graph
Nodes
{
nodeLabel: "productAttributeName",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
productAttributeId: {
identifier: true,
},
},
}
}
{
nodeLabel: "productAttributeValue",
schema: {
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
productAttributeId: {
identifier: 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,
},
},
}
}