feat: amount transaction and count of item
This commit is contained in:
@@ -12,15 +12,17 @@ type Order struct {
|
||||
OrderItems []OrderItem `json:"order_items" validate:"required"`
|
||||
}
|
||||
|
||||
type HistoryOrderParam struct {
|
||||
Limit int `form:"limit" json:"limit" example:"10"`
|
||||
Offset int `form:"offset" json:"offset" example:"0"`
|
||||
type OrderParam struct {
|
||||
PaymentType string `form:"payment_type" json:"payment_type" example:"CASH"`
|
||||
Limit int `form:"limit" json:"limit" example:"10"`
|
||||
Offset int `form:"offset" json:"offset" example:"0"`
|
||||
}
|
||||
|
||||
func (o *HistoryOrderParam) ToEntity(ctx mycontext.Context) entity.HistoryOrderSearch {
|
||||
return entity.HistoryOrderSearch{
|
||||
func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch {
|
||||
return entity.OrderSearch{
|
||||
PartnerID: ctx.GetPartnerID(),
|
||||
IsAdmin: ctx.IsAdmin(),
|
||||
PaymentType: o.PaymentType,
|
||||
Limit: o.Limit,
|
||||
Offset: o.Offset,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user