Service - Business: Difference between revisions
Jump to navigation
Jump to search
(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",...") |
No edit summary |
||
| Line 16: | Line 16: | ||
objectType: "business", | objectType: "business", | ||
canDelete: false, | canDelete: false, | ||
addOnDataStructure: [ | addOnDataStructure: [ | ||
{ | { | ||
| Line 82: | Line 78: | ||
} | } | ||
}, | }, | ||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"Business", | |||
relationshipTag: "removedBusiness" | |||
}, | |||
], | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "User", | |||
objectType: "user" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "Business", | |||
objectType: "business" | |||
}, | |||
linkType: "many" | |||
} | |||
}, | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== removedBusiness === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
removedBusiness: { | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"Business", | |||
relationshipTag: "hasBusiness" | |||
}, | |||
], | |||
links: [ | links: [ | ||
{ | { | ||
| Line 87: | Line 129: | ||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "User", | ||
objectType: "user" | objectType: "user" | ||
}, | }, | ||
| Line 94: | Line 136: | ||
to: { | to: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Business", | ||
objectType: "business" | objectType: "business" | ||
}, | }, | ||
Revision as of 01:07, 5 January 2026
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,
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"
}
},
canChangeToRelTypes: [
{
serviceTag:"Business",
relationshipTag: "removedBusiness"
},
],
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "User",
objectType: "user"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Business",
objectType: "business"
},
linkType: "many"
}
},
]
}
}
removedBusiness
{
removedBusiness: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
canChangeToRelTypes: [
{
serviceTag:"Business",
relationshipTag: "hasBusiness"
},
],
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