<?php
declare(strict_types=1);

/** @var \App\Core\Router $router */

use App\Middleware\AuthMiddleware;
use App\Middleware\TenantMiddleware;

$mw = [AuthMiddleware::class, TenantMiddleware::class];

$router->get('/customers', 'CustomerController@index', $mw);
$router->post('/customers', 'CustomerController@store', $mw);
$router->get('/customers/{id}', 'CustomerController@show', $mw);
$router->put('/customers/{id}', 'CustomerController@update', $mw);
$router->delete('/customers/{id}', 'CustomerController@destroy', $mw);

$router->get('/customers/{id}/ledger', 'CustomerController@ledger', $mw);
$router->get('/customers/{id}/outstanding', 'CustomerController@outstanding', $mw);

$router->post('/customers/validate-gstin', 'CustomerController@validateGstin', $mw);
$router->post('/customers/import', 'CustomerController@import', $mw);
$router->get('/customers/export', 'CustomerController@export', $mw);
