Go to the parent folder and run pip installation in a terminal.
pip install -e .- Install postgres and create a new database called
loan.
$ createdb loan- Initialize the database by running the script
init_db.
$ init_db- Initialize the
timelinetable by running the scriptinit_timeline.
$ init_timelineManual entries are recorded in the scripts manual_entry.py.
To delete the database, run
$ dropdb loanTo launch postgres interface on this database, run
$ psql loanThe database is structured around three main users.
jointfor the joint account.user_1(resp.user_2) for user_1's (resp. user_2's) balance regarding the joint account.
The wire table keeps track of all past transactions in accounting style.
The balance table keeps track of individual balance.
The joint balance represents the money due by the bank to the joint account. It matches the real account balance.
It is split between the individual balances, represents how much money is the joint account owe to each individual.
The timeline table is a timeline of loan repayment.
To account for recent loan repayment, run the script timeline_update.
$ timeline_updateNB: In the database, amounts are saved as integers, which represent money in cents.