Service - Ledger
Jump to navigation
Jump to search
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,
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
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