mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
43 lines
2.5 KiB
Go
43 lines
2.5 KiB
Go
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"`
|
|
ProjectFlockKandangId int64 `query:"project_flock_kandang_id" validate:"omitempty"`
|
|
DeliveryDate string `query:"delivery_date" validate:"omitempty"`
|
|
ProductId int64 `query:"product_id" validate:"omitempty"`
|
|
WarehouseId int64 `query:"warehouse_id" validate:"omitempty"`
|
|
SalesPersonId int64 `query:"sales_person_id" validate:"omitempty"`
|
|
MarketingId int64 `query:"marketing_id" validate:"omitempty"`
|
|
}
|
|
|
|
type PurchaseSupplierQuery struct {
|
|
Page int `query:"page" validate:"omitempty,min=1,gt=0"`
|
|
Limit int `query:"limit" validate:"omitempty,min=1,max=100,gt=0"`
|
|
AreaId int64 `query:"area_id" validate:"omitempty"`
|
|
SupplierId int64 `query:"supplier_id" validate:"omitempty"`
|
|
ProductId int64 `query:"product_id" validate:"omitempty"`
|
|
ProductCategoryId int64 `query:"product_category_id" validate:"omitempty"`
|
|
DateFrom string `query:"date_from" validate:"omitempty"`
|
|
DateTo string `query:"date_to" validate:"omitempty"`
|
|
SortBy string `query:"sort_by" validate:"omitempty"`
|
|
FilterBy string `query:"filter_by" validate:"omitempty"`
|
|
}
|