Service - Period
Jump to navigation
Jump to search
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"
}
},
]
}
}