<?php

namespace App\Http\Requests\ItemMaster;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'item_code' => 'sometimes|nullable|string|max:100',
            'item_name' => 'sometimes|string|max:255',
            'quantity' => 'sometimes|nullable|numeric|min:0',
            'unit' => 'sometimes|nullable|string|max:50',
            'unit_price' => 'sometimes|nullable|numeric|min:0',
            'total_price' => 'sometimes|nullable|numeric|min:0',
            'spec' => 'sometimes|nullable|string',
            'note' => 'sometimes|nullable|string',
        ];
    }
}
