// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1

package handler

import (
	"net/http"

	wallet "juwan-backend/app/wallet/api/internal/handler/wallet"
	"juwan-backend/app/wallet/api/internal/svc"

	"github.com/zeromicro/go-zero/rest"
)

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
			{
				// 获取余额
				Method:  http.MethodGet,
				Path:    "/balance",
				Handler: wallet.GetBalanceHandler(serverCtx),
			},
			{
				// 充值
				Method:  http.MethodPost,
				Path:    "/topup",
				Handler: wallet.TopupHandler(serverCtx),
			},
			{
				// 获取流水
				Method:  http.MethodGet,
				Path:    "/transactions",
				Handler: wallet.ListTransactionsHandler(serverCtx),
			},
			{
				// 提现
				Method:  http.MethodPost,
				Path:    "/withdraw",
				Handler: wallet.WithdrawHandler(serverCtx),
			},
		},
		rest.WithPrefix("/api/v1/wallet"),
	)
}
