<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\V1\Admin\Currency\AdminCurrencyIndexController;
use App\Http\Controllers\Api\V1\Admin\Currency\AdminCurrencyStoreController;
use App\Http\Controllers\Api\V1\Admin\Currency\AdminCurrencyUpdateController;
use App\Http\Controllers\Api\V1\Admin\Currency\AdminCurrencyDestroyController;

/**
 * 管理员币种主数据路由。
 */
Route::middleware('admin.api-resource')
    ->group(function (): void {
        Route::get('currencies', AdminCurrencyIndexController::class)
            ->name('api.v1.admin.currencies.index');
        Route::post('currencies', AdminCurrencyStoreController::class)
            ->name('api.v1.admin.currencies.store');
        Route::put('currencies/{currency:code}', AdminCurrencyUpdateController::class)
            ->name('api.v1.admin.currencies.update');
        Route::delete('currencies/{currency:code}', AdminCurrencyDestroyController::class)
            ->name('api.v1.admin.currencies.destroy');
    });
