feat[BE]: add MarketingType filter to marketing reports and update related validations

This commit is contained in:
aguhh18
2026-01-13 16:10:27 +07:00
parent 3c10866208
commit 1b5b5bc847
4 changed files with 43 additions and 9 deletions
@@ -23,6 +23,7 @@ type MarketingQuery struct {
ProductId int64 `query:"product_id" validate:"omitempty"`
WarehouseId int64 `query:"warehouse_id" validate:"omitempty"`
SalesPersonId int64 `query:"sales_person_id" validate:"omitempty"`
MarketingType string `query:"marketing_type" validate:"omitempty,oneof=ayam telur trading"`
FilterBy string `query:"filter_by" validate:"omitempty,oneof=so_date realization_date"`
StartDate string `query:"start_date" validate:"omitempty,datetime=2006-01-02"`
EndDate string `query:"end_date" validate:"omitempty,datetime=2006-01-02"`