Service - Variant Standard: Difference between revisions
Jump to navigation
Jump to search
| (10 intermediate revisions by 2 users not shown) | |||
| Line 7: | Line 7: | ||
https://bitbucket.org/izara-market-products/izara-market-products-variant-standard/src/master/ | https://bitbucket.org/izara-market-products/izara-market-products-variant-standard/src/master/ | ||
= | = Schemas = | ||
==ObjectSchemas== | |||
== | === variantStandard === | ||
=== | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"objectType": "variantStandard", | |||
"extendObjType": { | |||
"serviceTag": "VariantManager", | |||
"objectType": "variant" | |||
}, | |||
"storageResources": { | |||
"graph": { | |||
"storageType": "graph", | |||
"graphServerTag": "GraphHandler" | |||
}, | |||
"dynamoDB": { | |||
"storageType": "dynamoDB", | |||
"tableName": "VariantRecord", | |||
"serviceTag": "VariantManager" | |||
} | |||
}, | |||
"fieldNames": { | |||
"variantId": { | |||
"storageResourceTags": [ | |||
"graph", | |||
"dynamoDB" | |||
] | |||
} | |||
}, | |||
"generatedBy": "userGenerated" | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== variantProductLink === | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"objectType": "variantProductLink", | |||
"canDelete": true, | |||
"belongTo": { | |||
"serviceTag": "UserAccount", | |||
"objectType": "user" | |||
}, | |||
"addOnDataStructure": [], | |||
"storageResources": { | |||
"graph": { | |||
"storageType": "graph", | |||
"graphServerTag": "GraphHandler" | |||
} | |||
}, | |||
"fieldNames": { | |||
"variantProductLinkId": { | |||
"type": "string", | |||
"randomOnCreate": false, | |||
"requiredOnCreate": false, | |||
"optionalOnCreate": false, | |||
"canUpdate": false, | |||
"validation": { | |||
"pattern": "^[a-zA-Z0-9_-]+$" | |||
}, | |||
"storageResourceTags": [ | |||
"graph" | |||
], | |||
"hashOnCreate": [ | |||
"variantId", | |||
"productId" | |||
] | |||
}, | |||
"variantId": { | |||
"type": "string", | |||
"randomOnCreate": false, | |||
"requiredOnCreate": true, | |||
"optionalOnCreate": false, | |||
"canUpdate": false, | |||
"validation": { | |||
"pattern": "^[a-zA-Z0-9_-]+$" | |||
}, | |||
"storageResourceTags": [ | |||
"graph" | |||
] | |||
}, | |||
"productId": { | |||
"type": "string", | |||
"randomOnCreate": false, | |||
"requiredOnCreate": true, | |||
"optionalOnCreate": false, | |||
"canUpdate": false, | |||
"validation": { | |||
"pattern": "^[a-zA-Z0-9_-]+$" | |||
}, | |||
"storageResourceTags": [ | |||
"graph" | |||
] | |||
} | |||
}, | |||
"compositeKeyDeliminator": "_", | |||
"identifiers": [ | |||
{ | |||
"type": "identifier", | |||
"fieldName": "variantProductLinkId" | |||
} | |||
], | |||
"generatedBy": "userGenerated" | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== variantAttributeValueStandard === | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"objectType": "variantAttributeValueStandard", | |||
"addOnDataStructure": [], | |||
"storageResources": { | |||
"graph": { | |||
"storageType": "graph", | |||
"graphServerTag": "GraphHandler" | |||
} | |||
}, | |||
"fieldNames": { | |||
}, | |||
"extendObjType": { | |||
"objectType": "variantAttributeValue", | |||
"serviceTag": "VariantManager" | |||
}, | |||
"generatedBy": "userGenerated" | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == RelationshipSchemas == | ||
=== hasVariantProductLink === | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"relationshipServiceTag": "VariantStandard", | |||
"fieldNames": { | |||
"originTimeStamp": { | |||
"type": "number", | |||
"requiredOnCreate": false, | |||
"canUpdate": true, | |||
"validation": { | |||
}, | |||
"optionalOnCreate": false | |||
}, | |||
}, | |||
"storageResources": { | |||
"graph": { | |||
"storageType": "graph", | |||
"graphServerTag": "GraphHandler" | |||
} | |||
}, | |||
"links": [ | |||
{ | |||
"storageResourceTags": [ | |||
"graph" | |||
], | |||
"from": { | |||
"objType": { | |||
"serviceTag": "VariantStandard", | |||
"objectType": "variantProductLink" | |||
}, | |||
"linkType": "one", | |||
"requiredOnCreate": true, | |||
"handler": true | |||
}, | |||
"to": { | |||
"objType": { | |||
"serviceTag": "VariantStandard", | |||
"objectType": "variantStandard" | |||
}, | |||
"linkType": "one", | |||
"handler": true, | |||
"requiredOnCreate": false | |||
}, | |||
"canDelete": false | |||
} | |||
], | |||
"canMove": false | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== disabledVariantProductLink === | |||
= | |||
== | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
"relationshipServiceTag": "VariantStandard", | |||
"fieldNames": { | |||
"originTimeStamp": { | |||
"type": "number", | |||
"requiredOnCreate": false, | |||
"canUpdate": true, | |||
"validation": { | |||
}, | |||
"optionalOnCreate": false | |||
}, | |||
}, | |||
"storageResources": { | |||
"graph": { | |||
"storageType": "graph", | |||
"graphServerTag": "GraphHandler" | |||
} | |||
}, | |||
"links": [ | |||
{ | |||
"storageResourceTags": [ | |||
"graph" | |||
], | |||
"from": { | |||
"objType": { | |||
"serviceTag": "VariantStandard", | |||
"objectType": "variantProductLink" | |||
}, | |||
"linkType": "one", | |||
"handler": true, | |||
"requiredOnCreate": false | |||
}, | |||
"to": { | |||
"objType": { | |||
"serviceTag": "VariantStandard", | |||
"objectType": "variantStandard" | |||
}, | |||
"linkType": "one", | |||
"handler": true, | |||
"requiredOnCreate": false | |||
}, | |||
"canDelete": false | |||
} | |||
], | |||
"canMove": false | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 08:40, 13 January 2026
Overview
Handler service for the standard variant type.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-variant-standard/src/master/
Schemas
ObjectSchemas
variantStandard
{
"objectType": "variantStandard",
"extendObjType": {
"serviceTag": "VariantManager",
"objectType": "variant"
},
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
},
"dynamoDB": {
"storageType": "dynamoDB",
"tableName": "VariantRecord",
"serviceTag": "VariantManager"
}
},
"fieldNames": {
"variantId": {
"storageResourceTags": [
"graph",
"dynamoDB"
]
}
},
"generatedBy": "userGenerated"
}
variantProductLink
{
"objectType": "variantProductLink",
"canDelete": true,
"belongTo": {
"serviceTag": "UserAccount",
"objectType": "user"
},
"addOnDataStructure": [],
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"fieldNames": {
"variantProductLinkId": {
"type": "string",
"randomOnCreate": false,
"requiredOnCreate": false,
"optionalOnCreate": false,
"canUpdate": false,
"validation": {
"pattern": "^[a-zA-Z0-9_-]+$"
},
"storageResourceTags": [
"graph"
],
"hashOnCreate": [
"variantId",
"productId"
]
},
"variantId": {
"type": "string",
"randomOnCreate": false,
"requiredOnCreate": true,
"optionalOnCreate": false,
"canUpdate": false,
"validation": {
"pattern": "^[a-zA-Z0-9_-]+$"
},
"storageResourceTags": [
"graph"
]
},
"productId": {
"type": "string",
"randomOnCreate": false,
"requiredOnCreate": true,
"optionalOnCreate": false,
"canUpdate": false,
"validation": {
"pattern": "^[a-zA-Z0-9_-]+$"
},
"storageResourceTags": [
"graph"
]
}
},
"compositeKeyDeliminator": "_",
"identifiers": [
{
"type": "identifier",
"fieldName": "variantProductLinkId"
}
],
"generatedBy": "userGenerated"
}
variantAttributeValueStandard
{
"objectType": "variantAttributeValueStandard",
"addOnDataStructure": [],
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"fieldNames": {
},
"extendObjType": {
"objectType": "variantAttributeValue",
"serviceTag": "VariantManager"
},
"generatedBy": "userGenerated"
}
RelationshipSchemas
hasVariantProductLink
{
"relationshipServiceTag": "VariantStandard",
"fieldNames": {
"originTimeStamp": {
"type": "number",
"requiredOnCreate": false,
"canUpdate": true,
"validation": {
},
"optionalOnCreate": false
},
},
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"links": [
{
"storageResourceTags": [
"graph"
],
"from": {
"objType": {
"serviceTag": "VariantStandard",
"objectType": "variantProductLink"
},
"linkType": "one",
"requiredOnCreate": true,
"handler": true
},
"to": {
"objType": {
"serviceTag": "VariantStandard",
"objectType": "variantStandard"
},
"linkType": "one",
"handler": true,
"requiredOnCreate": false
},
"canDelete": false
}
],
"canMove": false
}
disabledVariantProductLink
{
"relationshipServiceTag": "VariantStandard",
"fieldNames": {
"originTimeStamp": {
"type": "number",
"requiredOnCreate": false,
"canUpdate": true,
"validation": {
},
"optionalOnCreate": false
},
},
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"links": [
{
"storageResourceTags": [
"graph"
],
"from": {
"objType": {
"serviceTag": "VariantStandard",
"objectType": "variantProductLink"
},
"linkType": "one",
"handler": true,
"requiredOnCreate": false
},
"to": {
"objType": {
"serviceTag": "VariantStandard",
"objectType": "variantStandard"
},
"linkType": "one",
"handler": true,
"requiredOnCreate": false
},
"canDelete": false
}
],
"canMove": false
}