package validation

type Create struct {
	ProjectFlockKandangID *uint   `json:"project_flock_kandang_id" validate:"omitempty,min=1"`
	WarehouseID           uint    `json:"warehouse_id" validate:"omitempty,min=1"`
	ProductID             uint    `json:"product_id" validate:"omitempty,min=1"`
	TransactionSubtype    string  `json:"transaction_subtype" validate:"required_without=TransactionSubType,max=64"`
	TransactionSubType    string  `json:"transaction_sub_type" validate:"required_without=TransactionSubtype,max=64"`
	FunctionCode          string  `json:"function_code" validate:"omitempty,max=64"`
	Qty                   float64 `json:"qty" validate:"omitempty,gt=0"`
	Quantity              float64 `json:"quantity" validate:"omitempty,gt=0"`
	Price                 float64 `json:"price" validate:"required,gte=0"`
	Notes                 string  `json:"notes" validate:"omitempty,max=255"`
	Note                  string  `json:"note" validate:"omitempty,max=255"`
}

type Query struct {
	Page               int    `query:"page" validate:"omitempty,min=1"`
	Limit              int    `query:"limit" validate:"omitempty,min=1,max=100"`
	ProductID          uint   `query:"product_id" validate:"omitempty,min=0"`
	WarehouseID        uint   `query:"warehouse_id" validate:"omitempty,min=0"`
	TransactionType    string `query:"transaction_type" validate:"omitempty,max=100"`
	TransactionSubtype string `query:"transaction_subtype" validate:"omitempty,max=64"`
	FunctionCode       string `query:"function_code" validate:"omitempty,max=64"`
}
