Service - Period
Revision as of 10:41, 22 February 2026 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Each period for an organization. = Repository = ... = Schemas = ==ObjectSchemas== === Period === <syntaxhighlight lang="JavaScript"> { objectType: "period", canDelete: false, belongTo: { serviceTag: "Organization", objectType: "organization" }, addOnDataStructure: [ { type:"versionedData", versionedDataLabel: "periodDetail", storageResourceTag : "myGraph", fieldNames: { "xxx":{ type: "string", requiredOnCreate: tru...")
Overview
Each period for an organization.
Repository
...
Schemas
ObjectSchemas
Period
{
objectType: "period",
canDelete: false,
belongTo: {
serviceTag: "Organization",
objectType: "organization"
},
addOnDataStructure: [
{
type:"versionedData",
versionedDataLabel: "periodDetail",
storageResourceTag : "myGraph",
fieldNames: {
"xxx":{
type: "string",
requiredOnCreate: true,
canUpdate: true,
userCanUpdate: true,
},
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
},
//.. dynamo for flows
},
fieldNames: {
periodId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
startTimestamp: {
type: "timestamp",
storageResourceTags: ['myGraph']
},
endTimestamp: {
type: "timestamp",
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "periodId"
}
]
}
Relationships
inPeriod
{
inPeriod: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Period",
objectType: "period"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Journal",
objectType: "journal"
},
linkType: "many"
}
},
]
}
}
- links a journal entry to the period it is in
- before updating a journal's timestamp (or amount etc) need to check period change, and period/s locked, need to unlock before can change