Service - Inventory Template: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Inventory instances can attach many inventoryTemplates, inventoryTemplates can instances can also attach many inventoryTemplate. Inventory Templates set default values, and fixed values that get passed to attached inventoryTemplate and inventory instances. Users can use other user's inventoryTemplates. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas == inventoryTemplate == <syntaxhighlight lang="JavaScript"> {...")
 
No edit summary
 
Line 21: Line 21:
canDelete: false,
canDelete: false,
belongTo: {
belongTo: {
serviceTag: "user",
serviceTag: "Business",
objectType: "user"
objectType: "business"
},
},
addOnDataStructure: [
addOnDataStructure: [

Latest revision as of 01:17, 5 January 2026

Overview

Inventory instances can attach many inventoryTemplates, inventoryTemplates can instances can also attach many inventoryTemplate.

Inventory Templates set default values, and fixed values that get passed to attached inventoryTemplate and inventory instances.

Users can use other user's inventoryTemplates.

Repository

...

Object Schemas

Additional Information
Per Service Schemas

inventoryTemplate

{
	objectType: "inventoryTemplate",
	canDelete: false,
	belongTo: {
		serviceTag: "Business",
		objectType: "business"
	},
	addOnDataStructure: [
		{
		  type: "attributeTree",    
		  attributeTreeTag: "inventoryTemplateDefault"
		},
		{
		  type: "attributeTree",    
		  attributeTreeTag: "inventoryTemplateFixed"
		},
	],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		inventoryTemplateId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
		inventoryTemplateName: {
			type: "string",
			requiredOnCreate: true,
			canUpdate: true,
			userCanUpdate:true,
			storageResourceTags: ['myGraph']
		},
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "inventoryTemplateId"
		}
    ]
}

Relationships

hasInventoryTemplate

{
	hasInventoryTemplate: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "inventoryManager",
						objectType: "inventory"
					},
					linkType: "many",
				},
				to: {
					objType: {
						serviceTag: "inventoryTemplate",
						objectType: "inventoryTemplate"
					},
					linkType: "many"
				}
			},
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "inventoryTemplate",
						objectType: "inventoryTemplate"
					},
					linkType: "many",
				},
				to: {
					objType: {
						serviceTag: "inventoryTemplate",
						objectType: "inventoryTemplate"
					},
					linkType: "many"
				}
			}
		]
	}
}

Working documents

Inventory Template