Service - Currency Table Standard: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 37: | Line 37: | ||
{ | { | ||
"objectType": "currencyTableRate", | "objectType": "currencyTableRate", | ||
"belongTo": { | |||
serviceTag: "CurrencyTableStandard", | |||
objectType: "currencyTableStandard" | |||
}, | |||
"storageResources": { | "storageResources": { | ||
graph: { | graph: { | ||
| Line 46: | Line 50: | ||
{ | { | ||
type:"versionedData", | type:"versionedData", | ||
versionedDataLabel: " | versionedDataLabel: "Value", | ||
storageResourceTag : "graph", | storageResourceTag : "graph", | ||
fieldNames: { | fieldNames: { | ||
| Line 59: | Line 63: | ||
"fieldNames": { | "fieldNames": { | ||
// none, identifier comes from hash or concat of currencyTableID and currencyId | // none, identifier comes from hash or concat of currencyTableID and currencyId | ||
currencyId: { | |||
fromRequiredOnCreate: { // will use data from requiredOnCreateLink that have same relType to use this value, and then | |||
relType: { | |||
serviceTag:"CurrencyTableStandard", | |||
relationshipTag:"isCurrency" | |||
}, | |||
fieldName:"" // optional default=same field name eg: now default == currencyId if not defined(use fieldname of object inside link when create) | |||
} | |||
}, | |||
currencyTableId: { | |||
fromRequiredOnCreate: { | |||
belongToObjType: true, | |||
fieldName:"" // optional default= same field name eg: now default == currencyTableId if not defined(use fieldname of object inside link when create) | |||
} | |||
} | |||
}, | }, | ||
identifiers: [ | identifiers: [ | ||
{ | { | ||
type: "identifier", | type: "identifier", | ||
fieldNames: [" | fieldNames: ["currencyId","currencyTableId"], // from required on create object identifiers | ||
name: " | name: "currencyTableRateId", // name of field in database | ||
}, | }, | ||
] | ] | ||
| Line 148: | Line 167: | ||
"linkType": "one", | "linkType": "one", | ||
"requiredOnCreate": false, | "requiredOnCreate": false, | ||
"handler": true, | "handler": true, | ||
}, | }, | ||
Latest revision as of 05:44, 3 June 2026
Overview
Handler service for standard currencyTables that include historical changes.
Repository
...
Schemas
ObjectSchemas
currencyTableStandard
{
"objectType": "currencyTableStandard",
"extendObjType": {
"serviceTag": "CurrencyTableManager",
"objectType": "currencyTable"
},
"storageResources": {},
"addOnDataStructure": [],
"fieldNames": {
"baseCurrencyId":{
type: "currency",
requiredOnCreate: true,
},
},
"generatedBy": "userGenerated"
}
currencyTableRate
{
"objectType": "currencyTableRate",
"belongTo": {
serviceTag: "CurrencyTableStandard",
objectType: "currencyTableStandard"
},
"storageResources": {
graph: {
storageType: "graph",
graphServerTag: "GraphHandler",
}
},
"addOnDataStructure": [
{
type:"versionedData",
versionedDataLabel: "Value",
storageResourceTag : "graph",
fieldNames: {
"exchangeRate":{
type: "number",
requiredOnCreate: true,
validation: {},
},
}
},
],
"fieldNames": {
// none, identifier comes from hash or concat of currencyTableID and currencyId
currencyId: {
fromRequiredOnCreate: { // will use data from requiredOnCreateLink that have same relType to use this value, and then
relType: {
serviceTag:"CurrencyTableStandard",
relationshipTag:"isCurrency"
},
fieldName:"" // optional default=same field name eg: now default == currencyId if not defined(use fieldname of object inside link when create)
}
},
currencyTableId: {
fromRequiredOnCreate: {
belongToObjType: true,
fieldName:"" // optional default= same field name eg: now default == currencyTableId if not defined(use fieldname of object inside link when create)
}
}
},
identifiers: [
{
type: "identifier",
fieldNames: ["currencyId","currencyTableId"], // from required on create object identifiers
name: "currencyTableRateId", // name of field in database
},
]
"generatedBy": "userGenerated"
}
RelationshipSchemas
baseCurrency
{
"relationshipServiceTag": "CurrencyTableStandard",
"fieldNames": {},
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"links": [
{
"storageResourceTags": [
"graph"
],
"from": {
"objType": {
"serviceTag": "CurrencyTableStandard",
"objectType": "currencyTableStandard"
},
"linkType": "many",
"handler": true,
"requiredOnCreate": true
},
"to": {
"objType": {
"serviceTag": "Currency",
"objectType": "currency"
},
"linkType": "one",
"requiredOnCreate": false,
"handler": true,
},
"canDelete": false
}
],
"canMove": false
}
isCurrency
{
"relationshipServiceTag": "CurrencyTableStandard",
"fieldNames": {},
"storageResources": {
"graph": {
"storageType": "graph",
"graphServerTag": "GraphHandler"
}
},
"links": [
{
"storageResourceTags": [
"graph"
],
"from": {
"objType": {
"serviceTag": "CurrencyTableRate",
"objectType": "currencyTableRate"
},
"linkType": "many",
"handler": true,
"requiredOnCreate": true
},
"to": {
"objType": {
"serviceTag": "Currency",
"objectType": "currency"
},
"linkType": "one",
"requiredOnCreate": false,
"handler": true,
},
"canDelete": false
}
],
"canMove": false
}