Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collateral class added. #14

Merged
merged 7 commits into from
Jun 22, 2021

Conversation

Purvanshsingh
Copy link
Member

I have added Collateral class to NPL Vocab & ApiDoc.
All the CRUD functionalities are added to the Collateral class.

DB structure with Collateral class :
Screenshot from 2021-06-21 13-48-14

GET, PUT, & POST operations :

Screenshot from 2021-06-21 14-48-50

Screenshot from 2021-06-21 14-49-15

Screenshot from 2021-06-21 14-49-31

@open-risk
Copy link
Contributor

Some further tests:

  • To test with actual loan id's
  • To test multiple collateral with same loan id
  • To test cascaded delete of collateral if the borrower class to which loan (and collateral) is linked is deleted

@Purvanshsingh Purvanshsingh removed the request for review from open-risk June 22, 2021 13:02
@Purvanshsingh
Copy link
Member Author

@open-risk I have added the mock_portfolio_generator.py script.

It generates :

  • 100 borrowers with no loan & no collateral
  • 100 borrowers with loan & no collateral
  • 100 borrowers with loan & collateral

And add them to the database via PUT request.

Borrower -> Loan -> Collateral are linked with the foreign key.

Tested: on deleting a borrower the respective Loan and the collateral associated with the loan_id deleted automatically.

@Purvanshsingh Purvanshsingh merged commit 0e7b58e into HTTP-APIs:main Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants