Service - Media Link: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 66: Line 66:
{
{
nodeLabel: "mediaLinkPropertyLabel",
nodeLabel: "mediaLinkPropertyLabel",
schema: {
//..
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyLabelId: {
identifier: true,
},
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "mediaLinkProperty",
nodeLabel: "mediaLinkProperty",
schema: {
//..
identifier: true,
restrictProperties: true,
restrictRelationships: true,
properties: {
propertyId: {
identifier: true, //(random uuid)
},
mediaLinkId: {
immutable: true,
},
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


=== Relationships ===
=== Relationships ===
Line 103: Line 84:
{
{
relationshipType: "hasMediaLinkProperty",
relationshipType: "hasMediaLinkProperty",
schema: {
//..
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
Line 116: Line 90:
{
{
relationshipType: "disabledMediaLinkProperty",
relationshipType: "disabledMediaLinkProperty",
schema: {
//..
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* links a MediaLink node to it's Properties
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "isMediaLinkPropertyLabel",
relationshipType: "isMediaLinkPropertyLabel",
schema: {
//..
elementCanBeRemoved: true,
allPropertiesImmutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
}
</syntaxhighlight>
</syntaxhighlight>
* links one MediaLinkProperty to one MediaLinkPropertyLabel
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]


== Basic node schemas ==
== Basic node schemas ==


mediaLinkPropertyLabel
mediaLinkPropertyLabel (build schema from [[NPM module - Izara Core - Property Node|DataSchemaLib]] function)
* [[Service - Translations Graph]]
* [[Service - Translations Graph]]


mediaLinkProperty
mediaLinkProperty (build schema from [[NPM module - Izara Core - Property Node|DataSchemaLib]] function)
* [[Service - Translations Graph]]
* [[Service - Translations Graph]]



Revision as of 14:12, 10 August 2021

Overview

Manages Media Links, links might attach to many subject node types, eg Product, Sell Offer, Product Attribute, Sell Offer Term,..

Repository

https://bitbucket.org/izara-core-media/izara-core-media-media-link/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 mediaLinkId
}
  • partition key: resultId
  • sort key: dataId

Graph database

Service - Media Graph

Nodes

{
	nodeLabel: "mediaLink",
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			mediaLinkId: {
				identifier: true, //(random uuid)
			},
			mediaId: {
				immutable: true,
			},
			linkFromId: {
				immutable: true, //eg: productId
			},
			linkFromType: {
				immutable: true, //eg: product, should match nodeLabel of linking node
			},
			mediaHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "mediaLinkPropertyLabel",
	//..
}
{
	nodeLabel: "mediaLinkProperty",
	//..
}

Relationships

{
	relationshipType: "hasMediaLinkProperty",
	//..
}
{
	relationshipType: "disabledMediaLinkProperty",
	//..
}
{
	relationshipType: "isMediaLinkPropertyLabel",
	//..
}

Basic node schemas

mediaLinkPropertyLabel (build schema from DataSchemaLib function)

mediaLinkProperty (build schema from DataSchemaLib function)

Working documents

Media Link