update Order History

This commit is contained in:
aditya.siregar
2024-07-26 22:32:24 +07:00
parent 5ef14f3043
commit 105bda67a3
8 changed files with 30 additions and 35 deletions
+8 -5
View File
@@ -1,6 +1,7 @@
package request
import (
"furtuna-be/internal/common/mycontext"
"furtuna-be/internal/constants/transaction"
"furtuna-be/internal/entity"
)
@@ -12,14 +13,16 @@ type Order struct {
}
type HistoryOrderParam struct {
Limit int `form:"limit" json:"limit" example:"10"`
Offset int `form:"offset" json:"offset" example:"0"`
Limit int `form:"limit" json:"limit" example:"10"`
Offset int `form:"offset" json:"offset" example:"0"`
}
func (o *HistoryOrderParam) ToEntity() entity.HistoryOrderSearch {
func (o *HistoryOrderParam) ToEntity(ctx mycontext.Context) entity.HistoryOrderSearch {
return entity.HistoryOrderSearch{
Limit: o.Limit,
Offset: o.Offset,
PartnerID: ctx.GetPartnerID(),
IsAdmin: ctx.IsAdmin(),
Limit: o.Limit,
Offset: o.Offset,
}
}