Service - Inventory Template

From Izara Wiki
Jump to navigation Jump to search

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