Update Order Response Ingredient
This commit is contained in:
parent
44dc3fa61c
commit
0a44135fb6
@ -1,14 +1,12 @@
|
||||
package models
|
||||
|
||||
// Pagination represents pagination information
|
||||
type Pagination struct {
|
||||
Page int `json:"page"`
|
||||
Limit int `json:"limit"`
|
||||
Total int64 `json:"total"`
|
||||
Total int64 `json:"total_count"`
|
||||
TotalPages int `json:"total_pages"`
|
||||
}
|
||||
|
||||
// PaginatedResponse represents a paginated response
|
||||
type PaginatedResponse[T any] struct {
|
||||
Data []T `json:"data"`
|
||||
Pagination Pagination `json:"pagination"`
|
||||
|
||||
@ -212,7 +212,6 @@ func ListOrdersQueryToModel(query *contract.ListOrdersQuery) *models.ListOrdersR
|
||||
}
|
||||
}
|
||||
|
||||
// Parse enum fields
|
||||
if query.OrderType != "" {
|
||||
orderType := constants.OrderType(query.OrderType)
|
||||
req.OrderType = &orderType
|
||||
@ -252,7 +251,7 @@ func ListOrdersQueryToModel(query *contract.ListOrdersQuery) *models.ListOrdersR
|
||||
}
|
||||
}
|
||||
|
||||
if query.DateFrom == query.DateTo {
|
||||
if query.DateFrom != "" && query.DateFrom == query.DateTo {
|
||||
newDate := req.DateTo.AddDate(0, 0, 1)
|
||||
req.DateTo = &newDate
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user