Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelOrderRequest ¶
type CancelOrderRequest struct { OrderID int64 `json:"order_id" binding:"required,gte=1"` AccountID int64 `json:"account_id" binding:"required,gte=1"` ServiceID int64 `json:"service_id" binding:"required,gte=1"` Amount int64 `json:"amount" binding:"required,gt=0"` }
func (CancelOrderRequest) ToDTO ¶
func (r CancelOrderRequest) ToDTO() order.CancelDTO
type CancelOrderResponse ¶
type CancelOrderResponse struct {
Balance int64 `json:"balance"`
}
type CreateOrderRequest ¶
type CreateOrderRequest struct { OrderID int64 `json:"order_id" binding:"required,gte=1"` AccountID int64 `json:"account_id" binding:"required,gte=1"` ServiceID int64 `json:"service_id" binding:"required,gte=1"` Amount int64 `json:"amount" binding:"required,gt=0"` }
func (CreateOrderRequest) ToDTO ¶
func (r CreateOrderRequest) ToDTO() order.CreateDTO
type CreateOrderResponse ¶
func NewCreateOrderResponse ¶
func NewCreateOrderResponse(entity order.Order, balance int64) CreateOrderResponse
type Handler ¶
type Handler struct { *handler.BaseHandler // contains filtered or unexported fields }
func (*Handler) CancelOrder ¶
func (*Handler) CreateOrder ¶
func (*Handler) InitAPI ¶
func (h *Handler) InitAPI(router *gin.RouterGroup)
func (*Handler) PayForOrder ¶
type PayForOrderRequest ¶
type PayForOrderRequest struct { OrderID int64 `json:"order_id" binding:"required,gte=1"` AccountID int64 `json:"account_id" binding:"required,gte=1"` ServiceID int64 `json:"service_id" binding:"required,gte=1"` Amount int64 `json:"amount" binding:"required,gt=0"` }
func (PayForOrderRequest) ToDTO ¶
func (r PayForOrderRequest) ToDTO() order.PayForDTO
type Response ¶
type Response struct { OrderID int64 `json:"order_id"` AccountID int64 `json:"account_id"` ServiceID int64 `json:"service_id"` Amount int64 `json:"amount"` IsPaid bool `json:"is_paid"` IsCancelled bool `json:"is_cancelled"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func NewResponse ¶
Click to show internal directories.
Click to hide internal directories.