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 |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 16: | Line 16: | ||
objectType: "business", | objectType: "business", | ||
canDelete: false, | canDelete: false, | ||
addOnDataStructure: [ | addOnDataStructure: [ | ||
{ | { | ||
| Line 32: | Line 28: | ||
type: "string", | type: "string", | ||
requiredOnCreate: true, | requiredOnCreate: true, | ||
}, | }, | ||
} | } | ||
| Line 69: | Line 63: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | == RelationshipSchemas == | ||
=== hasBusiness === | === hasBusiness === | ||
| Line 82: | Line 76: | ||
} | } | ||
}, | }, | ||
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 127: | ||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "User", | ||
objectType: "user" | objectType: "user" | ||
}, | }, | ||
| Line 94: | Line 134: | ||
to: { | to: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Business", | ||
objectType: "business" | objectType: "business" | ||
}, | }, | ||
| Line 106: | Line 146: | ||
* links a user to the businesses they manage | * links a user to the businesses they manage | ||
* does not convey ownership, each business is a standalone organization that has it's own RBAC | * does not convey ownership, each business is a standalone organization that has it's own RBAC (allowing for simple transfer of ownership of data) | ||
* user can link themselves to any businesses so ui can present list of connected businesses | |||
= Addresses = | = Addresses = | ||
Latest revision as of 14:56, 27 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,
},
}
},
],
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"
}
]
}
RelationshipSchemas
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 (allowing for simple transfer of ownership of data)
- user can link themselves to any businesses so ui can present list of connected businesses
Addresses
- use same structure as users in Izara Market