<?php

namespace App\Services\Dashboard\Province\PeopleMessages;

use App\Facades\DataTable\DataTableFacade;
use App\Models\PeopleMessage;
use Illuminate\Http\Request;

class DataTableService
{
    public function index(Request $request)
    {
        return DataTableFacade::run(
            PeopleMessage::query()->orderBy('id'),
            $request,
            allowedFilters: ['*'],
            allowedSortings: ['*'],
            allowedSelects: [
                'id','caller_phone_number','date', 'voice', 'listen_at', 'review_duration',
                'is_listen', 'action_id', 'action_name', 'description', 'savaneh_id'
            ]
        );
    }
}
