<?php

namespace App\Http\Requests\Recruitment;

class UpdateEmployerRequest extends StoreEmployerRequest
{
    public function rules(): array
    {
        $rules = parent::rules();
        $rules['company_name'] = ['sometimes', 'string', 'max:255'];
        $rules['country'] = ['sometimes', 'string', 'size:2'];

        return $rules;
    }

    /** @return array<string, mixed> */
    public function modelAttributes(): array
    {
        return array_intersect_key(parent::modelAttributes(), $this->all());
    }
}
