feat(purchase

This commit is contained in:
Efril
2026-08-11 22:41:10 +07:00
parent dbc143954c
commit e6078e3c0b
19 changed files with 532 additions and 17 deletions
+10 -5
View File
@@ -114,11 +114,16 @@ type PurchaseOrderAttachmentResponse struct {
}
type ListPurchaseOrdersRequest struct {
Page int `json:"page" validate:"min=1"`
Limit int `json:"limit" validate:"min=1,max=100"`
Search string `json:"search,omitempty"`
Status string `json:"status,omitempty" validate:"omitempty,oneof=draft sent approved received cancelled"`
VendorID *uuid.UUID `json:"vendor_id,omitempty"`
Page int `json:"page" validate:"min=1"`
Limit int `json:"limit" validate:"min=1,max=100"`
Search string `json:"search,omitempty"`
Status string `json:"status,omitempty" validate:"omitempty,oneof=draft sent approved received cancelled"`
VendorID *uuid.UUID `json:"vendor_id,omitempty"`
// Team is the single-value form of the two filters below, so the team picker
// can send back what it was given: a parent category id, "central" for Pusat,
// or "none" for purchases with no team yet. It replaces them rather than
// narrowing alongside them.
Team string `json:"team,omitempty"`
TeamScope string `json:"team_scope,omitempty" validate:"omitempty,oneof=category central"`
TeamCategoryID *uuid.UUID `json:"team_category_id,omitempty"`
StartDate *time.Time `json:"start_date,omitempty"`