<?php

namespace App\Http\Controllers\ProvinceDashboard\SystemMessages;

use App\Http\Controllers\Controller;
use app\Http\Traits\ApiResponse;
use App\Models\SystemMessage;
use App\Services\Dashboard\Province\SystemMessages\OperatorService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class OperatorController extends Controller
{
    use ApiResponse;
    /**
     * Display a listing of the resource.
     */
    public function index(Request $request, OperatorService $operatorService): JsonResponse
    {
        return response()->json($operatorService->datatable($request));
    }

    /**
     * Display the specified resource.
     */
    public function show(SystemMessage $systemMessage): JsonResponse
    {
        return $this->successResponse($systemMessage->only(['id','duration','date', 'voice']));
    }

    public function download(string $id)
    {
        //
    }

    public function excel()
    {

    }
}
