{
    "openapi": "3.0.0",
    "info": {
        "title": "Fee Module Core Schemas",
        "description": "Reusable DTO schemas (components) shared by the Fee Module web API.",
        "version": "1.0"
    },
    "components": {
        "schemas": {
            "FeeHead": {
                "description": "A fee head (a chargeable fee component) with its remittance state",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 12
                    },
                    "name": {
                        "type": "string",
                        "example": "Tuition Fee"
                    },
                    "description": {
                        "nullable": true,
                        "type": "string"
                    },
                    "accountId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "isActive": {
                        "type": "boolean",
                        "example": true
                    },
                    "priority": {
                        "type": "integer",
                        "example": 1
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 25000
                    },
                    "remittedAmount": {
                        "type": "number",
                        "format": "double",
                        "example": 10000
                    },
                    "balance": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "groupId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "groupName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "hasSubHeads": {
                        "type": "integer",
                        "example": 0
                    },
                    "frequency": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "refundableFeeHead": {
                        "type": "boolean",
                        "example": false
                    },
                    "instNotApplicableFee": {
                        "type": "boolean",
                        "example": false
                    },
                    "uniqueHeadId": {
                        "nullable": true,
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "IdentifyingContext": {
                "description": "Scope filter that narrows fee data to a course type, batch, department or batch start year",
                "properties": {
                    "courseTypeId": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "batchStartYear": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "departmentId": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "batchId": {
                        "type": "string",
                        "example": "ALL"
                    }
                },
                "type": "object"
            },
            "NeftPayment": {
                "description": "An offline (NEFT / DD / cheque / cash) fee payment request record",
                "properties": {
                    "id": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "example": "PENDING"
                    },
                    "studentId": {
                        "type": "integer",
                        "example": 4521
                    },
                    "semesterId": {
                        "type": "integer",
                        "example": 8
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "transactionId": {
                        "nullable": true,
                        "type": "string"
                    },
                    "remittedDate": {
                        "nullable": true,
                        "type": "string",
                        "example": "2024-05-12"
                    },
                    "paymentDetails": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "admissionNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "semesterName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "batchName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "batchId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "bankName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "paymentMethod": {
                        "nullable": true,
                        "type": "string",
                        "example": "NEFT"
                    },
                    "chequeNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "ddNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "remarks": {
                        "nullable": true,
                        "type": "string"
                    },
                    "selectedInstallment": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ReceiptList": {
                "description": "A summary row for a fee receipt in list views",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 9812
                    },
                    "studentId": {
                        "type": "integer",
                        "example": 4521
                    },
                    "rollNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentName": {
                        "type": "string",
                        "example": "Jane Doe"
                    },
                    "admissionNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "receiptNumber": {
                        "type": "string",
                        "example": "RCPT-2024-0091"
                    },
                    "receiptDate": {
                        "type": "string",
                        "example": "2024-05-12"
                    },
                    "paymentMethod": {
                        "type": "string",
                        "example": "ONLINE"
                    },
                    "semesterId": {
                        "type": "integer",
                        "example": 8
                    },
                    "semesterName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "batchId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "batchName": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "StudentFeeList": {
                "description": "A student together with the batches whose fee applies to them",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 4521
                    },
                    "name": {
                        "type": "string",
                        "example": "Jane Doe"
                    },
                    "admissionNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentFeeBatches": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "regNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "rollNo": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ApiResponse": {
                "description": "Standard response envelope returned by all Fee Module endpoints",
                "properties": {
                    "statusCode": {
                        "type": "integer",
                        "example": 200
                    },
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "message": {
                        "type": "string",
                        "example": ""
                    },
                    "result": {
                        "description": "Endpoint-specific payload"
                    }
                },
                "type": "object"
            }
        }
    }
}