add sorting server side po and expense

This commit is contained in:
giovanni
2026-05-13 13:28:37 +07:00
parent 4f03b631ef
commit 490c7fc9fd
6 changed files with 82 additions and 2 deletions
@@ -81,4 +81,6 @@ type Query struct {
Search string `query:"search" validate:"omitempty,max=100"`
CreatedFrom string `query:"created_from" validate:"omitempty,datetime=2006-01-02"`
CreatedTo string `query:"created_to" validate:"omitempty,datetime=2006-01-02"`
SortBy string `query:"sort_by" validate:"omitempty,oneof=po_expedition supplier requester_name products location po_date received_date due_date status created_at"`
SortOrder string `query:"sort_order" validate:"omitempty,oneof=asc desc ASC DESC"`
}