<?php

namespace App\Http\Requests\Inventory;

use App\Http\Requests\ApiFormRequest;

class InventoryAdjustRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return auth()->check();
    }

    public function rules(): array
    {
        return [
            'mode' => ['required', 'in:in,out,adjust'],
            'quantity' => ['required', 'integer', 'min:1'],
            'reason' => ['nullable', 'string', 'max:120'],
            'note' => ['nullable', 'string'],
        ];
    }
}
