<?php

use think\facade\Route;

/**
 * 附件相关路由
 */
Route::group('file', function () {
    //分类列表
    Route::get('category', 'v1.AttachmentCategory/index');
    //添加编辑分类
    Route::post('category/create', 'v1.AttachmentCategory/save');
    //分类详情
    Route::post('category/info', 'v1.AttachmentCategory/info');
    //删除分类
    Route::rule('category/:id', 'v1.AttachmentCategory/delete');
    //附件列表
    Route::get('file', 'v1.Attachment/index');
    //删除图片和数据记录
    Route::post('file/delete', 'v1.Attachment/delete');
    //移动图片分类
    Route::rule('file/do_move', 'v1.Attachment/moveImageCate');
    //上传图片
    Route::rule('upload/[:upload_type]', 'v1.Attachment/upload');

})->middleware([
    \app\system\middleware\AllowOriginMiddleware::class,
    \app\system\middleware\AdminAuthTokenMiddleware::class
]);
