<?php

use Illuminate\Support\Facades\Route;
use Modules\Manage\Http\Controllers\MiniprogramController;
use Modules\Manage\Http\Controllers\PayConfigController;

Route::prefix('manage')->group(function(){
    Route::prefix('miniprogram')->group(function () {
        //类型列表
        Route::get('typelist',[MiniprogramController::class,'typeList'])
        ->withoutMiddleware(config('catch.route.middlewares'));

        //添加
        Route::post('store',[MiniprogramController::class,'store']);

        //小程序列表
        Route::get('index',[MiniprogramController::class,'index']);

        //小程序详情
        Route::get('show/{id}',[MiniprogramController::class,'show']);

         //小程序详情
         Route::post('update/{id}',[MiniprogramController::class,'update']);

         //小程序分配列表
         Route::get('allocation/{miniprogram_id}',[MiniprogramController::class,'getAllocationInfo']);
        //分配小程序
         Route::post('allocation/{miniprogram_id}',[MiniprogramController::class,'allocationStore']);


        //分配小程序
        Route::get('companylist',[MiniprogramController::class,'companyList'])
        ->withoutMiddleware(config('catch.route.middlewares'));

    });

    Route::prefix('payConfig')->group(function(){
       Route::get('list', [PayConfigController::class, 'list']);
       Route::post('remark', [PayConfigController::class, 'remark']);
       Route::post('addConfig', [PayConfigController::class, 'addConfig']);
    });
});
