package validation type ExpenseQuery struct { Page int `query:"page" validate:"omitempty,min=1,gt=0"` Limit int `query:"limit" validate:"omitempty,min=1,max=100,gt=0"` Search string `query:"search" validate:"omitempty,max=100"` Category string `query:"category" validate:"omitempty,oneof=BOP NON-BOP"` SupplierId int64 `query:"supplier_id" validate:"omitempty"` KandangId int64 `query:"kandang_id" validate:"omitempty"` ProjectFlockKandangId int64 `query:"project_flock_kandang_id" validate:"omitempty"` ProjectFlockId int64 `query:"project_flock_id" validate:"omitempty"` NonstockId int64 `query:"nonstock_id" validate:"omitempty"` AreaId int64 `query:"area_id" validate:"omitempty"` LocationId int64 `query:"location_id" validate:"omitempty"` RealizationDate string `query:"realization_date" validate:"omitempty"` } type MarketingQuery struct { Page int `query:"page" validate:"omitempty,min=1,gt=0"` Limit int `query:"limit" validate:"omitempty,min=1,max=100,gt=0"` Search string `query:"search" validate:"omitempty,max=100"` CustomerId int64 `query:"customer_id" validate:"omitempty"` ProductId int64 `query:"product_id" validate:"omitempty"` WarehouseId int64 `query:"warehouse_id" validate:"omitempty"` SalesPersonId int64 `query:"sales_person_id" validate:"omitempty"` FilterBy string `query:"filter_by" validate:"omitempty,oneof=realization_date delivery_date"` StartDate string `query:"start_date" validate:"omitempty,datetime=2006-01-02"` EndDate string `query:"end_date" validate:"omitempty,datetime=2006-01-02"` SortBy string `query:"sort_by" validate:"omitempty,oneof=delivery_date customer warehouse product sales_person vehicle_number sales_amount hpp_amount qty average_weight total_weight sales_price hpp_price aging_days"` SortOrder string `query:"sort_order" validate:"omitempty,oneof=asc desc"` }