<?php

namespace App\Domains\Purchase\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UpdatePurchaseCustomerRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user() !== null;
    }

    /**
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return [
            'dni' => ['required', 'string'],
            'telefono' => ['required', 'string'],
            'nombre_apellido' => ['required', 'string'],
            'email' => ['required', 'string', 'email'],
        ];
    }
}
