Skip to content

Commit

Permalink
[MODFISTO-500] - Implement endpoint to return all finance data for FY (
Browse files Browse the repository at this point in the history
…#485)

* [MODFISTO-500] - Implement endpoint to return all finance data for FY

* [MODFISTO-500] - Implement endpoint to return all finance data for FY

* add fiscalYearId field

* Add extra fields

* change name to avoid collision

* fix field name
  • Loading branch information
azizbekxm authored Nov 15, 2024
1 parent 0d59a29 commit 1652e69
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mod-finance/examples/fy_finance_data.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"fiscalYearId": "123e4567-e89b-12d3-a456-426614174004",
"fiscalYearCode": "FY2023",
"fundId": "123e4567-e89b-12d3-a456-426614174000",
"fundCode": "FND001",
"fundName": "General Fund",
"fundDescription": "This fund is used for general purposes.",
"fundStatus": "Active",
"fundTags": {
"tagList": ["Education", "Research"]
},
"budgetId": "123e4567-e89b-12d3-a456-426614174001",
"budgetName": "Annual Budget",
"budgetStatus": "Active",
"budgetInitialAllocation": 1000000,
"budgetCurrentAllocation": 950000,
"budgetAllowableExpenditure": 80,
"budgetAllowableEncumbrance": 90
}
43 changes: 43 additions & 0 deletions mod-finance/examples/fy_finance_data_collection.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"fyFinanceData": [
{
"fiscalYearId": "123e4567-e89b-12d3-a456-426614174004",
"fiscalYearCode": "FY2023",
"fundId": "123e4567-e89b-12d3-a456-426614174000",
"fundCode": "FND001",
"fundName": "General Fund",
"fundDescription": "This fund is used for general purposes.",
"fundStatus": "Active",
"fundTags": {
"tagList": ["Education", "Research"]
},
"budgetId": "123e4567-e89b-12d3-a456-426614174001",
"budgetName": "Annual Budget",
"budgetStatus": "Active",
"budgetInitialAllocation": 1000000,
"budgetCurrentAllocation": 950000,
"budgetAllowableExpenditure": 80,
"budgetAllowableEncumbrance": 90
},
{
"fiscalYearId": "123e4567-e89b-12d3-a456-426614174005",
"fiscalYearCode": "FY2023",
"fundId": "123e4567-e89b-12d3-a456-426614174002",
"fundCode": "FND002",
"fundName": "Research Fund",
"fundDescription": "This fund is used for research purposes.",
"fundStatus": "Frozen",
"fundTags": {
"tagList": ["Science", "Innovation"]
},
"budgetId": "123e4567-e89b-12d3-a456-426614174003",
"budgetName": "Research Budget",
"budgetStatus": "Planned",
"budgetInitialAllocation": 500000,
"budgetCurrentAllocation": 450000,
"budgetAllowableExpenditure": 70,
"budgetAllowableEncumbrance": 85
}
],
"totalRecords": 2
}
87 changes: 87 additions & 0 deletions mod-finance/schemas/fy_finance_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Finance data for a fiscal year",
"type": "object",
"javaName": "FyFinanceData",
"properties": {
"fiscalYearId": {
"description": "UUID of the fiscal year",
"$ref": "../../common/schemas/uuid.json"
},
"fiscalYearCode": {
"description": "The code of the fiscal year",
"type": "string"
},
"fundId": {
"description": "Fund UUID",
"$ref": "../../common/schemas/uuid.json"
},
"fundCode": {
"description": "A unique code associated with the fund",
"$ref": "../../common/schemas/fund_code.json"
},
"fundName": {
"description": "The name of this fund",
"type": "string"
},
"fundDescription": {
"description": "A description of this fund",
"type": "string"
},
"fundStatus": {
"description": "The current status of this fund",
"type": "string",
"enum": [
"Active",
"Frozen",
"Inactive"
]
},
"fundTags": {
"type": "object",
"description": "Arbitrary tags associated with this fund",
"$ref": "../../../raml-util/schemas/tags.schema"
},
"budgetId": {
"description": "UUID of this budget",
"$ref": "../../common/schemas/uuid.json"
},
"budgetName": {
"description": "The name of the budget",
"type": "string"
},
"budgetStatus": {
"description": "The status of the budget",
"type": "string",
"enum": [
"Active",
"Frozen",
"Inactive",
"Planned",
"Closed"
]
},
"budgetInitialAllocation": {
"default": 0,
"description": "The amount of the first allocation made to this budget",
"type": "number"
},
"budgetCurrentAllocation": {
"description": "The current allocation amount for this budget",
"type": "number"
},
"budgetAllowableExpenditure": {
"description": "The expenditure percentage limit for this budget",
"type": "number"
},
"budgetAllowableEncumbrance": {
"description": "The encumbrance percentage limit for this budget",
"type": "number"
}
},
"required": [
"fiscalYearCode",
"fiscalYearId",
"fundId"
]
}
25 changes: 25 additions & 0 deletions mod-finance/schemas/fy_finance_data_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of fiscal year finance data",
"type": "object",
"properties": {
"fyFinanceData": {
"description": "The list of fiscal year finance data objects contained in this collection",
"type": "array",
"id": "fyFinanceData",
"items": {
"type": "object",
"$ref": "fy_finance_data.json"
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"fyFinanceData",
"totalRecords"
]
}

0 comments on commit 1652e69

Please sign in to comment.