<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
use Illuminate\Support\Facades\Route;
use Modules\Member\Controllers\MemberController;

// 会员管理路由配置
Route::name('member.')->prefix('member')->middleware(['auth.check:admin'])->group(function () {
	Route::controller(Modules\Member\Controllers\Admin\Index::class)->prefix('index')->name('index.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::post('/add', 'add')->name('add');
		Route::put('/edit', 'edit')->name('edit');
		Route::delete('/delete', 'delete')->name('delete');
		Route::get('/export', 'export')->name('export');
		Route::post('/import', 'import')->name('import');
	});
	Route::controller(Modules\Member\Controllers\Admin\Level::class)->prefix('level')->name('level.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::post('/add', 'add')->name('add');
		Route::put('/edit', 'edit')->name('edit');
		Route::delete('/delete', 'delete')->name('delete');
	});
	Route::controller(Modules\Member\Controllers\Admin\Account::class)->prefix('account')->name('account.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::post('/add', 'add')->name('add');
		Route::put('/edit', 'edit')->name('edit');
		Route::delete('/delete', 'delete')->name('delete');
	});

	Route::controller(Modules\Member\Controllers\Admin\Field::class)->prefix('field')->name('field.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::post('/add', 'add')->name('add');
		Route::put('/edit', 'edit')->name('edit');
		Route::delete('/delete', 'delete')->name('delete');
		Route::get('/fields', 'lists')->name('fields');
		Route::get('/setting', 'setting')->name('setting');
	});

	Route::controller(Modules\Member\Controllers\Admin\Extend::class)->prefix('extend')->name('extend.')->group(function () {
		Route::get('/index', 'index')->name('index');
		Route::put('/audit', 'audit')->name('audit');
		Route::delete('/delete', 'delete')->name('delete');
	});
});
