package validation

type Create struct {
	ProductId   uint    `json:"product_id" validate:"required,number,min=1"`
	WarehouseId uint    `json:"warehouse_id" validate:"required,number,min=1"`
	Quantity    float64 `json:"quantity" validate:"required,number,min=0"`
}

type Update struct {
	ProductId   *uint    `json:"product_id,omitempty" validate:"omitempty,number,min=1"`
	WarehouseId *uint    `json:"warehouse_id,omitempty" validate:"omitempty,number,min=1"`
	Quantity    *float64 `json:"quantity,omitempty" validate:"omitempty,number,min=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"`
	ProductId       uint   `query:"product_id" validate:"omitempty,number,min=1"`
	WarehouseId     uint   `query:"warehouse_id" validate:"omitempty,number,min=1"`
	LocationId      uint   `query:"location_id" validate:"omitempty,number,min=1"`
	Flags           string `query:"flags" validate:"omitempty"`
	KandangId       uint   `query:"kandang_id" validate:"omitempty,number,min=1"`
	AvailableOnly   bool   `query:"available_only"`
	TransferContext string `query:"transfer_context" validate:"omitempty,oneof=inventory_transfer"`
	StockMode       string `query:"stock_mode" validate:"omitempty,oneof=exclude_chickin"`
	Type            string `query:"type" validate:"omitempty"`
}
