Update History

This commit is contained in:
aditya.siregar
2024-07-30 22:02:36 +07:00
parent c7495b8bff
commit 719218da03
5 changed files with 47 additions and 9 deletions
+11 -4
View File
@@ -14,17 +14,24 @@ type Order struct {
type OrderParam struct {
PaymentType string `form:"payment_type" json:"payment_type" example:"CASH"`
StartDate string `form:"start_date" json:"start_date"`
EndDate string `form:"end_date" json:"end_date"`
Status string `form:"status" json:"status"`
Limit int `form:"limit" json:"limit" example:"10"`
Offset int `form:"offset" json:"offset" example:"0"`
}
func (o *OrderParam) ToOrderEntity(ctx mycontext.Context) entity.OrderSearch {
return entity.OrderSearch{
PartnerID: ctx.GetPartnerID(),
IsAdmin: ctx.IsAdmin(),
PartnerID: ctx.GetPartnerID(),
SiteID: ctx.GetSiteID(),
IsAdmin: ctx.IsAdmin(),
PaymentType: o.PaymentType,
Limit: o.Limit,
Offset: o.Offset,
Limit: o.Limit,
Offset: o.Offset,
StartDate: o.StartDate,
EndDate: o.EndDate,
Status: o.Status,
}
}