<?php

namespace App\Master\Http\Requests;

use Stancl\Tenancy\Database\Concerns\CentralConnection;

class UpdateUserRoleOnSiteRequest extends SiteRequest
{
    use CentralConnection;

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    #[\Override] public function rules()
    {
        $global = $this->getConnectionName();
        return [
            'userId' => [
                'required',
                "exists:$global.users,id",
            ],
            'role' => [
                'required',
            ]
        ];
    }
}
