<?php

namespace App\Http\Requests\ItemMaster;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'group_id' => 'nullable|integer|min:1', // 계층번호
            'item_code' => 'nullable|string|max:100',
            'item_name' => 'required|string|max:255',
            'quantity' => 'nullable|numeric|min:0',
            'unit' => 'nullable|string|max:50',
            'unit_price' => 'nullable|numeric|min:0',
            'total_price' => 'nullable|numeric|min:0',
            'spec' => 'nullable|string',
            'note' => 'nullable|string',
        ];
    }
}
