Service - Ledger: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 60: | Line 60: | ||
== Relationships == | == Relationships == | ||
=== | === hasChildLedger === | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
hasChildLedger: { | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 73: | Line 71: | ||
} | } | ||
}, | }, | ||
links: [ | links: [ | ||
{ | { | ||
storageResourceTags: ["myGraph"], | storageResourceTags: ["myGraph"], | ||
canDelete: true, | |||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Ledger", | ||
objectType: " | objectType: "ledger" | ||
}, | }, | ||
linkType: " | linkType: "many", | ||
}, | }, | ||
to: { | to: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Ledger", | ||
objectType: " | objectType: "ledger" | ||
}, | }, | ||
linkType: "many" | linkType: "many" | ||
| Line 102: | Line 95: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | * creates ledger heirachy | ||
* validate no infinite link loops | |||
=== includesAccount === | |||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
includesAccount: { | |||
storageResources: { | storageResources: { | ||
myGraph: { | myGraph: { | ||
| Line 113: | Line 109: | ||
} | } | ||
}, | }, | ||
links: [ | links: [ | ||
{ | { | ||
storageResourceTags: ["myGraph"], | storageResourceTags: ["myGraph"], | ||
canDelete: true, | |||
from: { | from: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "Ledger", | ||
objectType: " | objectType: "ledger" | ||
}, | }, | ||
linkType: " | linkType: "many", | ||
}, | }, | ||
to: { | to: { | ||
objType: { | objType: { | ||
serviceTag: " | serviceTag: "AccountManager", | ||
objectType: " | objectType: "account" | ||
}, | }, | ||
linkType: "many" | linkType: "many" | ||
| Line 142: | Line 133: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* | * Accounts that are included in a ledger | ||
= Working documents = | = Working documents = | ||
Revision as of 11:35, 22 February 2026
Overview
A ledger can be used to generate a report such as the general ledger, each ledger specifies which Accounts are it's top level ledger accounts and which rollup in the generated report.
Repository
...
Object Schemas
- Additional Information
- Per Service Schemas
ledger
{
objectType: "ledger",
canDelete: false,
belongTo: {
serviceTag: "Organization",
objectType: "organization"
},
addOnDataStructure: [
{
type:"versionedData",
versionedDataLabel: "ledgerDetail",
storageResourceTag : "myGraph",
fieldNames: {
"xxx":{
type: "string",
requiredOnCreate: true,
canUpdate: true,
userCanUpdate: true,
},
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
},
//.. dynamo for flows
},
fieldNames: {
ledgerId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "ledgerId"
}
]
}
Relationships
hasChildLedger
{
hasChildLedger: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
canDelete: true,
from: {
objType: {
serviceTag: "Ledger",
objectType: "ledger"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "Ledger",
objectType: "ledger"
},
linkType: "many"
}
},
]
}
}
- creates ledger heirachy
- validate no infinite link loops
includesAccount
{
includesAccount: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
canDelete: true,
from: {
objType: {
serviceTag: "Ledger",
objectType: "ledger"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "AccountManager",
objectType: "account"
},
linkType: "many"
}
},
]
}
}
- Accounts that are included in a ledger