feat: filter order history
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -173,6 +173,9 @@ func (h *Handler) toHistoryOrderResponse(resp *entity.HistoryOrder) response.His
|
||||
PaymentType: resp.PaymentType,
|
||||
Status: resp.Status,
|
||||
Amount: resp.Amount,
|
||||
VisitDate: resp.VisitDate.Format(time.RFC3339),
|
||||
TicketStatus: resp.TicketStatus,
|
||||
Source: resp.Source,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ type OrderParam struct {
|
||||
Limit int `form:"limit" json:"limit" example:"10"`
|
||||
Offset int `form:"offset" json:"offset" example:"0"`
|
||||
Period string `form:"period" json:"period" example:"1d,7d,1m"`
|
||||
Source string `form:"source" json:"source" example:"tes"`
|
||||
}
|
||||
|
||||
func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch {
|
||||
@@ -58,6 +59,7 @@ func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch {
|
||||
EndDate: o.EndDate,
|
||||
Status: o.Status,
|
||||
Period: o.Period,
|
||||
Source: o.Source,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ type HistoryOrder struct {
|
||||
PaymentType string `json:"payment_type"`
|
||||
Status string `json:"status"`
|
||||
Amount float64 `json:"amount"`
|
||||
VisitDate string `json:"visit_date"`
|
||||
TicketStatus string `json:"ticket_status"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
type OrderItem struct {
|
||||
|
||||
Reference in New Issue
Block a user