Service - Sale: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= Overview = Sales of inventory to customers. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas == sale == <syntaxhighlight lang="JavaScript"> { objectType: "customer", canDelete: false, belongTo: { serviceTag: "user", objectType: "user" }, addOnDataStructure: [], storageResources: { myGraph: { storageType: "graph", graphServerTag: "GraphHandler" } }, fieldNames: { saleId: { type: "string", randomO...")
 
No edit summary
Line 29: Line 29:
fieldNames: {
fieldNames: {
saleId: {
saleId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
saleTotal:  {
type: "numeric",
storageResourceTags: ['myGraph']
},
saleCurrencyId: {
type: "string",
type: "string",
randomOnCreate: true,
randomOnCreate: true,
Line 42: Line 51:
}
}
</syntaxhighlight>
</syntaxhighlight>
== invoiceGroup ==
<syntaxhighlight lang="JavaScript">
{
objectType: "invoiceGroup",
canDelete: false,
belongTo: {
serviceTag: "user",
objectType: "user"
},
addOnDataStructure: [],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
fieldNames: {
invoiceGroupId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
numberingType: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
numberingSettings: {
type: "object",
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "invoiceGroupId"
}
]
}
</syntaxhighlight>
* groups sales into classifications
* invoice numbers can be separated by groups, eg separate sequencial numbering
* numberingSettings saves details such as prefix, suffix, method of sequencial ordering, period when numbering resets


== Relationships ==
== Relationships ==
Line 70: Line 125:
serviceTag: "sale",
serviceTag: "sale",
objectType: "sale"
objectType: "sale"
},
linkType: "many"
}
},
]
}
}
</syntaxhighlight>
=== hasSaleLineItem ===
<syntaxhighlight lang="JavaScript">
{
hasSaleLineItem: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "sale",
objectType: "sale"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "saleLineItemManager",
objectType: "saleLineItem"
},
},
linkType: "many"
linkType: "many"

Revision as of 09:45, 2 January 2026

Overview

Sales of inventory to customers.

Repository

...

Object Schemas

Additional Information
Per Service Schemas

sale

{
	objectType: "customer",
	canDelete: false,
	belongTo: {
		serviceTag: "user",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
	},
	fieldNames: {
		saleId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
		saleTotal:  {
			type: "numeric",
			storageResourceTags: ['myGraph']
		},
		saleCurrencyId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
	},
	identifiers: [
		{
			type: "identifier",
			fieldName: "saleId"
		}
	]
}

invoiceGroup

{
	objectType: "invoiceGroup",
	canDelete: false,
	belongTo: {
		serviceTag: "user",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
	},
	fieldNames: {
		invoiceGroupId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
		numberingType: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
		numberingSettings: {
			type: "object",
			storageResourceTags: ['myGraph']
		},
	},
	identifiers: [
		{
			type: "identifier",
			fieldName: "invoiceGroupId"
		}
	]
}
  • groups sales into classifications
  • invoice numbers can be separated by groups, eg separate sequencial numbering
  • numberingSettings saves details such as prefix, suffix, method of sequencial ordering, period when numbering resets

Relationships

hasSale

{
	hasSale: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "customer",
						objectType: "customer"
					},
					linkType: "one",
				},
				to: {
					objType: {
						serviceTag: "sale",
						objectType: "sale"
					},
					linkType: "many"
				}
			},
		]
	}
}

hasSaleLineItem

{
	hasSaleLineItem: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "sale",
						objectType: "sale"
					},
					linkType: "one",
				},
				to: {
					objType: {
						serviceTag: "saleLineItemManager",
						objectType: "saleLineItem"
					},
					linkType: "many"
				}
			},
		]
	}
}

Addresses

  • use same structure as orders in Izara Market

Working documents

Sale