<?php

use App\Http\Controllers\api\v1\ServiceOrderController;
use Illuminate\Support\Facades\Route;

// Service order management routes
Route::middleware(['user.auth'])->prefix('order')->group(function () {
    Route::get('/customer', [ServiceOrderController::class, 'customerOrders']);
    Route::get('/vendor', [ServiceOrderController::class, 'vendorOrders']);
    Route::post('/', [ServiceOrderController::class, 'store']);
    Route::put('/{order_id}/status', [ServiceOrderController::class, 'updateStatus']);
    Route::post('/{order_id}/confirm-payment', [ServiceOrderController::class, 'confirmPayment']);
    Route::post('/{order_id}/confirm-delivery', [ServiceOrderController::class, 'confirmDelivery']);
    Route::post('/{order_id}/cancel', [ServiceOrderController::class, 'cancel']);
    Route::post('/{order_id}/refund', [ServiceOrderController::class, 'refund']);
});
