This Source Code created and generated by GOGEN
All the concept on how this code layouted and structured can be read on GOGEN Documentation
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
-
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
POST /user
{
"Name": "mirza"
}
GET /user
POST /user/:userID/wallet
{
"WalletName": "w1",
"CardName": "cardone",
"LimitAmount": 500,
"LimitDuration": "weekly"
}
GET /user/:userID/wallet/
POST /user/:userID/wallet/:walletID/card
{
"CardName": "cardtwo",
"LimitAmount": 300,
"LimitDuration": "monthly"
}
POST /user/:userID/wallet/:walletID/topupwallet
{
"Amount": 50000
}
POST /user/:userID/wallet/:walletID/card/:cardID/spendmoney
{
"Amount": 100
}
https://www.postman.com/collections/1d3dad7b8775e9f6bec5
go run main.go appone