Service - Organization: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
Mint (talk | contribs)
Mint (talk | contribs)
 
Line 59: Line 59:
storageResourceTags: ['myGraph']
storageResourceTags: ['myGraph']
},
},
      precision: {
        type: "integer",
        randomOnCreate: false, 
        optionalOnCreate: true,
        requiredOnCreate: false,
        validation: {
          pattern: pattern
        },
        storageResourceTags: ['graph'],
      }
     },
     },
     identifiers: [
     identifiers: [

Latest revision as of 04:25, 11 June 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: "Detail",
			storageResourceTag : "myGraph",
			fieldNames: {
				"organizationName":{
					type: "string",
					requiredOnCreate: true,
					canUpdate: true,
					userCanUpdate: true,
				},
				"dailyRateCurrencyTableId":{
					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']
		},

      precision: {
        type: "integer",
        randomOnCreate: false,  
        optionalOnCreate: true,
        requiredOnCreate: false, 
        validation: {
          pattern: pattern
        },
        storageResourceTags: ['graph'],
      }
    },
    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