<?php

use think\facade\Route;

/**
 * 附件相关路由
 */
Route::group('file', function () {
    //附件列表
    Route::get('file', 'file.SystemAttachment/index');
    //删除图片和数据记录
    Route::post('file/delete', 'file.SystemAttachment/delete');
    //移动图片分类表单
    Route::get('file/move', 'file.SystemAttachment/move');
    //移动图片分类
    Route::put('file/do_move', 'file.SystemAttachment/moveImageCate');
    //上传图片
    Route::post('upload/[:upload_type]', 'file.SystemAttachment/upload');
    //附件分类管理资源路由
    Route::resource('category', 'file.SystemAttachmentCategory');

})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\badminapi\middleware\BadminAuthTokenMiddleware::class,
    \app\badminapi\middleware\BadminCkeckRole::class,
]);