fix filter purchase ?approval_status=approved,rejected and ?product_category_id=1,2,3

This commit is contained in:
ragilap
2026-04-01 16:06:57 +07:00
parent 65409e5efa
commit 796417d56f
3 changed files with 96 additions and 35 deletions
@@ -66,9 +66,9 @@ type Query struct {
SupplierID uint `query:"supplier_id" validate:"omitempty,gt=0"`
AreaID uint `query:"area_id" validate:"omitempty,gt=0"`
LocationID uint `query:"location_id" validate:"omitempty,gt=0"`
ProductCategoryID uint `query:"product_category_id" validate:"omitempty,gt=0"`
ProductCategoryID string `query:"product_category_id" validate:"omitempty,max=500"`
Search string `query:"search" validate:"omitempty,max=100"`
ApprovalStatus string `query:"approval_status" validate:"omitempty,max=100"`
ApprovalStatus string `query:"approval_status" validate:"omitempty,max=500"`
PoDate string `query:"po_date" validate:"omitempty,datetime=2006-01-02"`
PoDateFrom string `query:"po_date_from" validate:"omitempty,datetime=2006-01-02"`
PoDateTo string `query:"po_date_to" validate:"omitempty,datetime=2006-01-02"`