<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class AccessRequestsRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'status' => ['required'],
            'message' => ['required'],
            'reviewed_by' => ['nullable', 'exists:users'],
            'server_id' => ['required', 'exists:game_servers'],
            'reviewed_at' => ['nullable', 'date'],
        ];
    }

    public function authorize(): bool
    {
        return true;
    }
}
