Service - Period: Difference between revisions
Jump to navigation
Jump to search
(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...") |
No edit summary |
||
| Line 10: | Line 10: | ||
==ObjectSchemas== | ==ObjectSchemas== | ||
=== PeriodConfig === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
objectType: "PeriodConfig", | |||
canDelete: false, | |||
belongTo: { | |||
serviceTag: "Organization", | |||
objectType: "organization" | |||
}, | |||
addOnDataStructure: [ | |||
{ | |||
type:"versionedData", | |||
versionedDataLabel: "periodConfig", | |||
storageResourceTag : "myGraph", | |||
fieldNames: { | |||
"xxx":{ | |||
type: "string", | |||
requiredOnCreate: true, | |||
canUpdate: true, | |||
userCanUpdate: true, | |||
}, | |||
} | |||
}, | |||
], | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
}, | |||
//.. dynamo for flows | |||
}, | |||
fieldNames: { | |||
periodConfigId: { | |||
type: "string", | |||
randomOnCreate: true, | |||
storageResourceTags: ['myGraph'] | |||
}, | |||
}, | |||
identifiers: [ | |||
{ | |||
type: "identifier", | |||
fieldName: "periodConfigId" | |||
} | |||
] | |||
} | |||
</syntaxhighlight> | |||
* parent config for periods | |||
=== Period === | === Period === | ||
| Line 77: | Line 127: | ||
myGraph: { | myGraph: { | ||
storageType: "graph", | storageType: "graph", | ||
graphServerTag: "GraphHandler" | graphServerTag: "GraphHandler" | ||
} | } | ||
}, | }, | ||
| Line 105: | Line 155: | ||
* links a journal entry to the period it is in | * 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 | * before updating a journal's timestamp (or amount etc) need to check period change, and period/s locked, need to unlock before can change | ||
=== hasPeriod === | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
hasPeriod: { | |||
storageResources: { | |||
myGraph: { | |||
storageType: "graph", | |||
graphServerTag: "GraphHandler" | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["myGraph"], | |||
from: { | |||
objType: { | |||
serviceTag: "Period", | |||
objectType: "periodConfig" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "Period", | |||
objectType: "period" | |||
}, | |||
linkType: "many" | |||
} | |||
}, | |||
] | |||
} | |||
} | |||
</syntaxhighlight> | |||
= Working documents = | = Working documents = | ||
Latest revision as of 11:55, 3 March 2026
Overview
Each period for an organization.
Repository
...
Schemas
ObjectSchemas
PeriodConfig
{
objectType: "PeriodConfig",
canDelete: false,
belongTo: {
serviceTag: "Organization",
objectType: "organization"
},
addOnDataStructure: [
{
type:"versionedData",
versionedDataLabel: "periodConfig",
storageResourceTag : "myGraph",
fieldNames: {
"xxx":{
type: "string",
requiredOnCreate: true,
canUpdate: true,
userCanUpdate: true,
},
}
},
],
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
},
//.. dynamo for flows
},
fieldNames: {
periodConfigId: {
type: "string",
randomOnCreate: true,
storageResourceTags: ['myGraph']
},
},
identifiers: [
{
type: "identifier",
fieldName: "periodConfigId"
}
]
}
- parent config for periods
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
hasPeriod
{
hasPeriod: {
storageResources: {
myGraph: {
storageType: "graph",
graphServerTag: "GraphHandler"
}
},
links: [
{
storageResourceTags: ["myGraph"],
from: {
objType: {
serviceTag: "Period",
objectType: "periodConfig"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "Period",
objectType: "period"
},
linkType: "many"
}
},
]
}
}