Open amolkittur opened 5 days ago
We need to develop several API endpoints to handle transactions imported from an Excel file and perform various operations such as fetching, modifying, deleting, and verifying transactions. Below is a detailed description of each endpoint, including methods, URLs, parameters, and functionalities.
Endpoint: transactions/import-transactions
Method: POST
Description:
TransactionsPast
sheet in the Excel file.AccID
(e.g., Tr02_debit.db
).Parameters:
month
(optional): The name of the month to filter transactions. Defaults to the current month if not specified.Endpoint: /transactions/{trNo}/{transactionId} **Method:**
PUT`
Description:
trNo
from the designated folder.transactionId
in the specified table.Parameters:
trNo
: The transaction number or account identifier (e.g., Tr02
).transactionId
: The unique identifier of the transaction to be modified.Request Body:
{
"columnName1": "newValue1",
"columnName2": "newValue2"
// Add additional columns and values as needed
}
Need to decide on how to pass which fields to modify or how to send only which values needs to be changed
Endpoint: /transactions/{trNo}/{transactionId}
Method: DELETE
Description:
trNo
from the folder where all the databases are located.transactionId
in the specified table.Parameters:
trNo
: The transaction number or account identifier.transactionId
: The unique identifier of the transaction to be deleted.Endpoint: /transactions/{trNo}/weekly
Method: GET
Description:
trNo
that occurred during the specified week.Parameters:
trNo
: The transaction number or account identifier.weekStart
(optional): The start date of the week in YYYY-MM-DD
format. Defaults to the current week if not provided.weekEnd
(optional): The end date of the week. Defaults to seven days after weekStart
if not provided.Import Transactions
POST /transactions/import?month=September
Modify Transaction
PUT /transactions/{trNo}/{transactionId}
Body: { "columnName1": "newValue1", "columnName2": "newValue2" }
Delete Transaction
DELETE /transactions/{trNo}/{transactionId}
Fetch Weekly Transactions
GET /transactions/{trNo}/weekly?weekStart=YYYY-MM-DD&weekEnd=YYYY-MM-DD
transactionId
and trNo
.Note: Adjust the endpoints and parameters as necessary to fit the specific requirements of your application. Feel free to suggest improvements or additional features that could enhance the system.
*_debit.db
file.transactionId
for accurate retrieval and modification.Let me know if there's anything else you'd like to add or modify!
Convert Excel File to Database, Implement Data Flow, and Integrate FastAPI Endpoints
Description
We need to convert our current Excel file to a database, implement a specific data flow in our PyQt application, and integrate FastAPI endpoints for communication between the PyQt app and the database.
Required Data Flow
Update Transactions
Account Verification and Creation
Balance Update in "5_Hand Loans"
Tasks
FastAPI Integration
Additional Notes