<?php

use App\Http\Controllers\ReviewController;
use Illuminate\Support\Facades\Route;

Route::get('/reviews', [ReviewController::class, 'index'])->middleware('permission:config.review,view');

Route::get('/reviews/schedule/{scheduleId}',          [ReviewController::class, 'indexBySchedule'])->middleware('permission:config.review,view');
Route::get('/reviews/client/{clientId}/sent',         [ReviewController::class, 'clientSent'])->middleware('permission:config.review,view');
Route::get('/reviews/client/{clientId}/received',     [ReviewController::class, 'clientReceived'])->middleware('permission:config.review,view');
Route::get('/reviews/provider/{providerId}/sent',     [ReviewController::class, 'providerSent'])->middleware('permission:config.review,view');
Route::get('/reviews/provider/{providerId}/received', [ReviewController::class, 'providerReceived'])->middleware('permission:config.review,view');
Route::get('/reviews/{origin}/{originId}',            [ReviewController::class, 'indexByOrigin'])->middleware('permission:config.review,view');
Route::post('/reviews',                               [ReviewController::class, 'store'])->middleware('permission:config.review,add');
Route::put('/reviews/{id}',                           [ReviewController::class, 'update'])->middleware('permission:config.review,edit');
Route::delete('/reviews/{id}',                        [ReviewController::class, 'destroy'])->middleware('permission:config.review,delete');
