draft grpc

This commit is contained in:
2026-03-13 02:17:18 +00:00
parent ea2edbb9e0
commit 91e5e3542b
116 changed files with 44505 additions and 558 deletions

View File

@@ -1,3 +1,6 @@
//go:build ignore
// +build ignore
package payment
import "github.com/gin-gonic/gin"
@@ -5,10 +8,19 @@ import "github.com/gin-gonic/gin"
// PaymentHandler defines the interface for payment operations
type PaymentHandler interface {
CreatePayment(c *gin.Context)
ListPaymentHistory(c *gin.Context)
TopupWallet(c *gin.Context)
DownloadInvoice(c *gin.Context)
}
// CreatePaymentRequest defines the payload for creating a payment
type CreatePaymentRequest struct {
PlanID string `json:"plan_id" binding:"required"`
PlanID string `json:"plan_id" binding:"required"`
TermMonths int32 `json:"term_months" binding:"required"`
PaymentMethod string `json:"payment_method" binding:"required"`
TopupAmount *float64 `json:"topup_amount,omitempty"`
}
type TopupWalletRequest struct {
Amount float64 `json:"amount" binding:"required"`
}