Service - Organization: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
A user can have many organizations, each organization has it's | A user can have many organizations, each organization has it's independent accounting. | ||
= Repository = | = Repository = | ||
| Line 16: | Line 16: | ||
objectType: "organization", | objectType: "organization", | ||
canDelete: false, | canDelete: false, | ||
addOnDataStructure: [ | addOnDataStructure: [ | ||
type: "propertyValue" | { | ||
type: "propertyValue" | |||
}, | |||
{ | |||
type:"versionedData", | |||
versionedDataLabel: "organizationDetail", | |||
storageResourceTag : "myGraph", | |||
fieldNames: { | |||
"organizationName":{ | |||
type: "string", | |||
requiredOnCreate: true, | |||
canUpdate: true, | |||
userCanUpdate: true, | |||
}, | |||
} | |||
}, | |||
], | ], | ||
storageResources: { | storageResources: { | ||
| Line 33: | Line 44: | ||
type: "string", | type: "string", | ||
randomOnCreate: true, | randomOnCreate: true, | ||
storageResourceTags: ['myGraph'] | storageResourceTags: ['myGraph'] | ||
}, | }, | ||
functionalCurrency: { | functionalCurrency: { | ||
type: "currency", | type: "currency", | ||
requiredOnCreate: true, | |||
canUpdate: false, | |||
userCanUpdate: false, | |||
storageResourceTags: ['myGraph'] | storageResourceTags: ['myGraph'] | ||
}, | }, | ||
| Line 62: | Line 69: | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
hasOrganization: { | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"Organization", | |||
relationshipTag: "removedOrganization" | |||
}, | |||
], | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "User", | |||
objectType: "user" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "Organization", | |||
objectType: "organization" | |||
}, | |||
linkType: "many" | |||
} | |||
}, | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
=== removedOrganization === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
removedOrganization: { | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 69: | Line 116: | ||
} | } | ||
}, | }, | ||
canChangeToRelTypes: [ | |||
{ | |||
serviceTag:"Organization", | |||
relationshipTag: "hasOrganization" | |||
}, | |||
], | |||
links: [ | links: [ | ||
{ | { | ||
| Line 74: | Line 127: | ||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "User", | ||
objectType: "user" | objectType: "user" | ||
}, | }, | ||
| Line 81: | Line 134: | ||
to: { | to: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Organization", | ||
objectType: "organization" | objectType: "organization" | ||
}, | }, | ||
| Line 91: | Line 144: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* links a user to the organization they manage | |||
* does not convey ownership, each organization is a standalone organization that has it's own RBAC | |||
* this allows for simple transfer of ownership of data | |||
= Addresses = | = Addresses = | ||
Latest revision as of 01:09, 5 January 2026
Overview
A user can have many organizations, each organization has it's independent accounting.
Repository
...
Object Schemas
- Additional Information
- Per Service Schemas
organization
{
objectType: "organization",
canDelete: false,
addOnDataStructure: [
{
type: "propertyValue"
},
{
type:"versionedData",
versionedDataLabel: "organizationDetail",
storageResourceTag : "myGraph",
fieldNames: {
"organizationName":{
type: "string",
requiredOnCreate: true,
canUpdate: true,
userCanUpdate: true,
},
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
fieldNames: {
organizationId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
functionalCurrency: {
type: "currency",
requiredOnCreate: true,
canUpdate: false,
userCanUpdate: false,
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "organizationId"
}
]
}
Relationships
hasOrganization
{
hasOrganization: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
canChangeToRelTypes: [
{
serviceTag:"Organization",
relationshipTag: "removedOrganization"
},
],
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "User",
objectType: "user"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Organization",
objectType: "organization"
},
linkType: "many"
}
},
]
}
}
removedOrganization
{
removedOrganization: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
canChangeToRelTypes: [
{
serviceTag:"Organization",
relationshipTag: "hasOrganization"
},
],
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "User",
objectType: "user"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Organization",
objectType: "organization"
},
linkType: "many"
}
},
]
}
}
- links a user to the organization they manage
- does not convey ownership, each organization 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