Service - Business
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"
},
"belongTo": {
"serviceTag": "User",
"objectType": "user"
},
{
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"
}
]
}
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
- this allows for simple transfer of ownership of data
Addresses
- use same structure as users in Izara Market