Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.77 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.77 KB

Service for working with user balance

Ci passing Coverage

TODO

  • Write test
  • Setup Github CI

Requirements

make, docker, docker-compose

optional

golangci-lint, apache benchmark, newman, go-cleanarch

setup data create table from file data\postgres\migrations\init.sql insert data from file data\postgres\migrations\payment_public_account.sql

make bin/money
make up

server running on localhost:8000 swagger ui running on localhost:80

Use cases

  • Get the user's current balance.
  • Get the transaction history of the account.
  • Transfer funds from user to user.
  • Debit or credit of funds from account.
  • Converting balance to other currencies.

Improvments

  • Use Credit/Debit transaction account, Transaction(id, account_id uuid, credit int, debit int, desc: string)

Database UML

cursor

Pagination when sorting by date is implemented via the cursor to optimize the OFFSET operation

The user rarely looks at the entire transaction history when sorting by any gender. Therefore, it is possible to save data for users and update it during financial transactions.

cursor cursor

Improvements in architecture to increase fault tolerance

cursor cursor