<?php

namespace App\Http\Requests\Locker;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'locker_number'   => 'required|string|max:50|unique:lockers',
            'category_id'     => 'required|exists:locker_categories,id',
            'zone_id'         => 'nullable|exists:locker_zones,id',
            'physical_key_id' => 'nullable|string|max:100|unique:lockers',
            'deposit_amount'  => 'nullable|numeric|min:0',
            'notes'           => 'nullable|string',
        ];
    }
}
