Service - Forum Tree: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
= Overview =
= Overview =


Tree used to categorize forum topics. Forum topics can then be the hasPrimarySubject of a comment to begin a new topic in the forum.
Tree used to categorize forum topics. Forum topics can then be the hasPrimarySubject of a comment to begin a new conversation under that forumTopic.


Many forum trees can be created with their own forum topic hierarchy.
Many forum trees can be created with their own forum topic hierarchy.
Line 69: Line 69:
objectType: "forumTopicLink",
objectType: "forumTopicLink",
canDelete: true,
canDelete: true,
belongTo: {
serviceTag: "forumTree",
objectType: "forumTree"
}
storageResources: {
storageResources: {
myGraph: {
myGraph: {
Line 214: Line 218:
serviceTag: "forumTree",
serviceTag: "forumTree",
objectType: "forumTopicLink"
objectType: "forumTopicLink"
},
linkType: "many",
handler: true
},
to: {
objType: {
serviceTag: "forumTree",
objectType: "forumTopic"
},
linkType: "many"
}
}
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "forumTree",
objectType: "forumTopic"
},
},
linkType: "many",
linkType: "many",

Latest revision as of 01:28, 11 August 2025

Overview

Tree used to categorize forum topics. Forum topics can then be the hasPrimarySubject of a comment to begin a new conversation under that forumTopic.

Many forum trees can be created with their own forum topic hierarchy.

Forum topics can be linked to by anywhere in any forumTree.

Repository

https://bitbucket.org/izara-core-shared/izara-core-shared-forum-tree

RBAC

Forum trees have their own RBAC permission system, this can be used to add functionality such as moderation and rules per forum tree.

Object Schemas

Additional Information
Per Service Schemas

objType

forumTree

{
	objectType: "forumTree",
	canDelete: false,
	addOnDataStructure: [
		{
			type:"versionedData",
			versionedDataLabel: "forumTreeConfig",
			storageResourceTag : "myGraph",
			fieldNames: {
				"forumName":{
					type: "string",
					requiredOnCreate: true
					canUpdate: true,
				},
			}
        },
	],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		forumTreeId: {
			type: "string",
			randomOnCreate: true,
			canUpdate: false,
			storageResourceTags: ['myGraph']
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "forumTreeId"
		}
    ]
}

forumTopicLink

{
	objectType: "forumTopicLink",
	canDelete: true,
	belongTo: {
		serviceTag: "forumTree",
		objectType: "forumTree"
	}
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		forumTopicLinkId: {
			type: "string",
			randomOnCreate: true,
			canUpdate: false,
			storageResourceTags: ['myGraph']
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "forumTopicLinkId"
		}
    ]
}
  • Links a forumTopic as a child of another forumTopic or under a forumTree

forumTopic

{
	objectType: "forumTopic",
	canDelete: true,
	addOnDataStructure: [
		{
			type:"versionedData",
			versionedDataLabel: "forumTopicConfig",
			storageResourceTag : "myGraph",
			fieldNames: {
				"forumTopicName":{
					type: "string",
					requiredOnCreate: true
					canUpdate: true,
				},
			}
        },
	],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		}
    },
    fieldNames: {
		forumTopicId: {
			type: "string",
			randomOnCreate: true,
			canUpdate: false,
			storageResourceTags: ['myGraph']
		}
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "forumTopicId"
		}
    ]
}

Object Relationships

hasChildTopic

{
	"hasChildTopic": { // also "hasDisabledChildTopic"
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "forumTree",					
						objectType: "forumTree"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "forumTree",				
						objectType: "forumTopicLink"					
					},				
					linkType: "many"
				}
			}
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "forumTree",					
						objectType: "forumTopic"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "forumTree",				
						objectType: "forumTopicLink"					
					},				
					linkType: "many"
				}
			}
		]
	}
}

isTopic

{
	"isTopic": {
		fieldNames: {
		},
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "forumTree",					
						objectType: "forumTopicLink"
					},
					linkType: "many",
					handler: true					
				},
				to: {
					objType: {
						serviceTag: "forumTree",				
						objectType: "forumTopic"					
					},				
					linkType: "many"
				}
			}
		]
	}
}

Working documents

Forum Tree