<?php

namespace App\Http\Requests\Admin\Master\Product;

use Illuminate\Foundation\Http\FormRequest;

class TransferStockRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->can('products.transfer_stock');
    }

    public function rules(): array
    {
        return [
            'quantity' => ['required', 'integer', 'min:1'],
            'description' => ['nullable', 'string', 'max:500'],
        ];
    }

    public function attributes(): array
    {
        return [
            'quantity' => 'jumlah transfer',
            'description' => 'keterangan',
        ];
    }
}
