Service - Entry

From Izara Wiki
Revision as of 12:30, 4 January 2026 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = A credit or debit entry linked between a journal entry and an account. = Repository = ... = Object Schemas = ; Additional Information: Per Service Schemas == entry == <syntaxhighlight lang="JavaScript"> { objectType: "entry", canDelete: false, belongTo: { serviceTag: "user", objectType: "user" }, addOnDataStructure: [], storageResources: { myGraph: { storageType: "graph", graphServerTag: "GraphHandler" }, myGraph: { storage...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

A credit or debit entry linked between a journal entry and an account.

Repository

...

Object Schemas

Additional Information
Per Service Schemas

entry

{
	objectType: "entry",
	canDelete: false,
	belongTo: {
		serviceTag: "user",
		objectType: "user"
	},
	addOnDataStructure: [],
	storageResources: {
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		},
		myGraph: {
			storageType: "graph",
			graphServerTag: "GraphHandler"
		},
		"dynamo": {
		  "storageType": "dynamoDB",
		  "tableName": "entry",
		}  
    },
    fieldNames: {
		entryId: {
			type: "string",
			randomOnCreate: true,
			storageResourceTags: ['myGraph']
		},
		amount: {
			type: "currencyValue",
			storageResourceTags: ['myGraph']
		},
		accountingStatus: { // "open"|"processing"|"locked"
			type: "string",
			storageResourceTags: ['dynamo']
		},
    },
    identifiers: [
		{
			type: "identifier",
			fieldName: "entryId"
		}
    ]
}
  • accountingStatus: when a period is being closed we set all entries to processing, then once the return is completed set to locked
  • when processing or locked entries cannot be changed (journals cannot be changed if either of the entries on each side are processing or locked
  • maybe the journal also has an accountingStatus, so easy to confirm cannot make changes, or perhaps only journals because entries cannot be changed directly

Relationships

hasEntry

{
	hasInventoryTemplate: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "Journal",
						objectType: "journal"
					},
					linkType: "one",
				},
				to: {
					objType: {
						serviceTag: "Entry",
						objectType: "entry"
					},
					requiredOnCreate: true,
					linkType: "many"
				}
			},
		]
	}
}

inAccount

{
	hasInventoryTemplate: {
		storageResources: {
			myGraph: {
				storageType: "graph",
				graphServerTag: "GraphHandler"			
			}
		},
		links: [
			{
				storageResourceTags: ["myGraph"],
				from: {
					objType: {
						serviceTag: "Entry",
						objectType: "entry"
					},
					requiredOnCreate: true,
					linkType: "many"
				},
				to: {
					objType: {
						serviceTag: "AccountManager",
						objectType: "account"
					},
					linkType: "one"
				}
			},
		]
	}
}

Working documents

Entry