Skip to content

mirzaakhena/mywallet

Repository files navigation

MyWallet

This Source Code created and generated by GOGEN

All the concept on how this code layouted and structured can be read on GOGEN Documentation

Go Report Card

Usecase Story

There is a list of users, each user can have many wallets.
Each wallet holds the balance amount the user has.
Each wallet has many cards.
Each card can have limits
limit on money that can be spent daily, weekly, monthly.

User can topup wallet directly 
User can only spend money through card 

Usecase

  • Register User

  • Show All User

  • Add New Wallet

  • Show User Wallets Info

  • Add Card To Wallet

  • Topup Wallet

  • Spend Money

  • User Create Team

  • Admin Team Add User

  • Show All User Team

API

Register User

POST /user
{
    "Name": "mirza"
}

Show All User

GET /user

Add New Wallet

POST /user/:userID/wallet
{
    "WalletName": "w1",
    "CardName": "cardone",
    "LimitAmount": 500,
    "LimitDuration": "weekly"
}

Show User Wallets Info

GET /user/:userID/wallet/

Add Card To Wallet

POST /user/:userID/wallet/:walletID/card
{
    "CardName": "cardtwo",
    "LimitAmount": 300,
    "LimitDuration": "monthly"
}

Topup Wallet

POST /user/:userID/wallet/:walletID/topupwallet
{
    "Amount": 50000 
}

Spend Money

POST /user/:userID/wallet/:walletID/card/:cardID/spendmoney
{
    "Amount": 100
}

Postman collection

https://www.postman.com/collections/1d3dad7b8775e9f6bec5

Run Application

go run main.go appone

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages