<?php

use App\Http\Controllers\Api\V1\Admin\Reports\AdminReportDailyProfitController;
use App\Http\Controllers\Api\V1\Admin\Reports\AdminReportPlayDimensionController;
use App\Http\Controllers\Api\V1\Admin\Reports\AdminReportPlayerWinLossController;
use App\Http\Controllers\Api\V1\Admin\Reports\ReportJobDownloadController;
use App\Http\Controllers\Api\V1\Admin\Reports\ReportJobIndexController;
use App\Http\Controllers\Api\V1\Admin\Reports\ReportJobShowController;
use App\Http\Controllers\Api\V1\Admin\Reports\ReportJobStoreController;
use Illuminate\Support\Facades\Route;

/** 报表中心：汇总查询与异步导出任务。 */
Route::middleware('admin.api-resource')->group(function (): void {
    Route::get('reports/daily-profit', AdminReportDailyProfitController::class)
        ->name('api.v1.admin.reports.daily-profit');
    Route::get('reports/player-win-loss', AdminReportPlayerWinLossController::class)
        ->name('api.v1.admin.reports.player-win-loss');
    Route::get('reports/play-dimension', AdminReportPlayDimensionController::class)
        ->name('api.v1.admin.reports.play-dimension');

    Route::get('report-jobs', ReportJobIndexController::class)
        ->name('api.v1.admin.report-jobs.index');
    Route::post('report-jobs', ReportJobStoreController::class)
        ->name('api.v1.admin.report-jobs.store');
    Route::get('report-jobs/{report_job}', ReportJobShowController::class)
        ->name('api.v1.admin.report-jobs.show');
    Route::get('report-jobs/{report_job}/download', ReportJobDownloadController::class)
        ->name('api.v1.admin.report-jobs.download');
});
