<?php

namespace App\Http\Requests\Api\V1\Recipe;

use Illuminate\Foundation\Http\FormRequest;

class UpdateScoopYieldRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'ingredient_id' => 'sometimes|exists:ingredients,id',
            'option_set_item_id' => 'nullable|exists:option_set_items,id',
            'yield_per_scoop' => 'sometimes|numeric|min:0',
            'unit' => 'sometimes|string|max:50',
            'is_active' => 'boolean',
        ];
    }
}
