<?php

namespace App\Http\Requests\Member;

use Illuminate\Foundation\Http\FormRequest;

// ══════════════════════════════════════════════════════════════════
//  InPractice — RateReplyRequest
//  Location: app/Http/Requests/Member/RateReplyRequest.php
//
//  Validates rating a forum reply 1–5.
//  Pattern mirrors RateSolutionRequest.
// ══════════════════════════════════════════════════════════════════

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

    public function rules(): array
    {
        return [
            'rating' => ['required', 'integer', 'min:1', 'max:5'],
        ];
    }

    public function messages(): array
    {
        return [
            'rating.required' => __('forum.validation_rating_required'),
            'rating.min'      => __('forum.validation_rating_range'),
            'rating.max'      => __('forum.validation_rating_range'),
        ];
    }
}
