Service - Business
Revision as of 01:03, 5 January 2026 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = A user can have many businesses, each business has it's independent set of data. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas == business == <syntaxhighlight lang="JavaScript"> { objectType: "business", canDelete: false, belongTo: { serviceTag: "user", objectType: "user" }, addOnDataStructure: [ { type: "propertyValue" }, { type:"versionedData", versionedDataLabel: "businessDetail",...")
Overview
A user can have many businesses, each business has it's independent set of data.
Repository
...
Object Schemas
- Additional Information
- Per Service Schemas
business
{
objectType: "business",
canDelete: false,
belongTo: {
serviceTag: "user",
objectType: "user"
},
addOnDataStructure: [
{
type: "propertyValue"
},
{
type:"versionedData",
versionedDataLabel: "businessDetail",
storageResourceTag : "myGraph",
fieldNames: {
"businessName":{
type: "string",
requiredOnCreate: true,
canUpdate: true,
userCanUpdate:true,
},
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
fieldNames: {
businessId: {
type: "string",
randomOnCreate: true,
canUpdate: false,
userCanUpdate: false,
storageResourceTags: ['myGraph']
},
functionalCurrency: {
type: "currency",
requiredOnCreate: true,
canUpdate: false,
userCanUpdate: false,
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "businessId"
}
]
}
Relationships
hasBusiness
{
hasBusiness: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "user",
objectType: "user"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "business",
objectType: "business"
},
linkType: "many"
}
},
]
}
}
- links a user to the businesses they manage
- does not convey ownership, each business is a standalone organization that has it's own RBAC
- this allows for simple transfer of ownership of data
Addresses
- use same structure as users in Izara Market