<?php

use App\Admin\Controllers\CashOutController;
use App\Admin\Controllers\HelloController;
use App\Admin\Controllers\MemberAddressController;
use App\Admin\Controllers\MemberConfigController;
use App\Admin\Controllers\MemberUserController;
use App\Admin\Controllers\ServiceCategoryController;
use App\Admin\Controllers\ServiceController;
use App\Admin\Controllers\ServiceOrderController;
use App\Admin\Controllers\ServiceProjectController;
use App\Admin\Controllers\TechnicianApproveController;
use App\Admin\Controllers\TechnicianPositionController;
use App\Admin\Controllers\TechnicianUserController;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

    $router->resource('hello', HelloController::class);

    // 服务相关
    $router->resource('service-categroy', ServiceCategoryController::class);
    $router->resource('service-project', ServiceProjectController::class);

    // 技师相关
    $router->resource('technician-user', TechnicianUserController::class);
    $router->resource('technician-approve', TechnicianApproveController::class);
    $router->resource('technician-position', TechnicianPositionController::class);

    // 会员管理
    $router->resource('member-user', MemberUserController::class);
    $router->resource('member-address', MemberAddressController::class);
    $router->resource('member-config', MemberConfigController::class);

    // 订单管理
    $router->resource('service-order', ServiceOrderController::class);

    // 钱包相关
    $router->resource('cash-out', CashOutController::class);
});
