Service - Organization

From Izara Wiki
Revision as of 01:09, 5 January 2026 by Sven the Barbarian (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Working documents

Organization