update Order History
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user