<?php

// Prefix: /api/stats
$router->group(['prefix' => 'stats', 'as' => 'stats', 'middleware' => ['adminAuth']], function ($router) {
    // 企业统计
    $router->get('/company-count', ['as' => 'company-count.index', 'uses' => 'CompanyCountController@index']);
    $router->get('/company-count/export', ['as' => 'company-count.export', 'uses' => 'CompanyCountController@export']);

    // 订单统计
    $router->get('/order', ['as' => 'order.index', 'uses' => 'OrderController@index']);
    $router->get('/order/export', ['as' => 'order.export', 'uses' => 'OrderController@export']);
    $router->get('/order/detail', ['as' => 'order.detail', 'uses' => 'OrderController@detail']);
    $router->get('/order/detail/export', ['as' => 'order.detail.export', 'uses' => 'OrderController@detailExport']);

    // 企业月报表
    $router->get('/company-report', ['as' => 'company-report.index', 'uses' => 'CompanyReportController@index']);
    $router->get('/company-report/export', ['as' => 'company-report.export', 'uses' => 'CompanyReportController@export']);
    $router->get('/company-report/detail', ['as' => 'company-report.detail', 'uses' => 'CompanyReportController@detail']);
    $router->get('/company-report/detail/export', ['as' => 'company-report.detail.export', 'uses' => 'CompanyReportController@detailExport']);

    // 销售激活统计
    $router->get('/sold-activated', ['as' => 'sold-activated.index', 'uses' => 'SoldActivatedController@index']);
});
