Service - Comment

From Izara Wiki
Revision as of 14:47, 22 September 2023 by Sven the Barbarian (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

A single comment made by a user. A comment can be part of a conversation thread (or perhaps many), or perhaps standalone or connected to any object in the project.

Repository

  • not yet made:

https://bitbucket.org/izara-conversations/izara-conversations-comment

DynamoDB tables

LogicalResults

Standard LogicalResults Per Service

Graph database

Nodes

{
	nodeLabel: "{CommentLib.COMMENT_GRAPH_NODE_LABEL}", // "comment"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			commentId: {
				identifier: true, // create unique id from request params and uniqueMessageId
			},
		},
	}
}
{
	nodeLabel: "{CommentLib.COMMENT_LINK_GRAPH_NODE_LABEL}", // "commentLink"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			commentLinkId: {
				identifier: true, // create unique id from request params and uniqueMessageId
			},
		},
	}
}
  • Is a node in between a comment and another object, eg replying to a comment
  • Set as it's own node so can create relationships to the links (eg when a user traverses the link, so we can create weights for links)

Relationships

{
	relationshipType: "{CommentLib.IN_REPLY_TO_GRAPH_REL_TYPE}", // "inReplyTo_Comment"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{CommentLib.COMMENT_HAS_REFERENCE_GRAPH_REL_TYPE}", // "commentHas_Reference"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{CommentLib.COMMENT_HAS_REPLY_GRAPH_REL_TYPE}", // "commentHas_Reply"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{CommentLib.COMMENT_HAS_NEXT_COMMENT_GRAPH_REL_TYPE}", // "commentHas_NextComment"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
{
	relationshipType: "{CommentLib.COMMENT_HAS_REPLY_GRAPH_REL_TYPE}", // "commentHas_Quote"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
			startChar: ##, // when the quote starts in the comment
			endChar: ##, // when the quote ends in the comment
		},
	}
}
  • Connect to commentLinks, which in turn connect to other objects
{
	relationshipType: "{CommentLib.COMMENTLINKTO_OBJECT_GRAPH_REL_TYPE}", // "commentLinkTo_Object"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • Connects a commentLink to an object
{
	relationshipType: "{CommentLib.COMMENTVIEWED_BY_USER_GRAPH_REL_TYPE}", // "commentViewedBy_User"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
			viewSource: "xx" // "directView"|"replyLink"|"chronologicalLink" how the user came to view this comment, maybe also add identifier for eg replyLink
		},
	}
}
  • Each time a user views a comment add a link
  • Could add other metrics like view time

Working documents

Comment