package validation type Create struct { Name string `json:"name" validate:"required_strict,min=3,max=50"` Type string `json:"type" validate:"required_strict,max=50"` AreaId uint `json:"area_id" validate:"required_strict,number,gt=0"` LocationId *uint `json:"location_id,omitempty" validate:"omitempty,number,gt=0"` KandangId *uint `json:"kandang_id,omitempty" validate:"omitempty,number,gt=0"` } type Update struct { Name *string `json:"name,omitempty" validate:"omitempty,max=50"` Type *string `json:"type,omitempty" validate:"omitempty,max=50"` AreaId *uint `json:"area_id,omitempty" validate:"omitempty,number,gt=0"` LocationId *uint `json:"location_id,omitempty" validate:"omitempty,number,gt=0"` KandangId *uint `json:"kandang_id,omitempty" validate:"omitempty,number,gt=0"` } type Query struct { Page int `query:"page" validate:"omitempty,number,min=1"` Limit int `query:"limit" validate:"omitempty,number,min=1,max=100"` Search string `query:"search" validate:"omitempty,max=50"` AreaId int `query:"area_id" validate:"omitempty,number,gt=0"` LocationId int `query:"location_id" validate:"omitempty,number,gt=0"` ActiveProjectFlockOnly bool `query:"active_project_flock"` ExcludeIDs []uint `query:"-" validate:"omitempty,dive,gt=0"` TransferContext string `query:"transfer_context" validate:"omitempty,oneof=inventory_transfer"` }