<?php

namespace App\Datatables\Admin\Shop;

use App\Datatables\ParentDataTable as DataTable;
use App\Models\Shop\DeliveryPackage;
use Yajra\DataTables\Html\Column;

class DeliveryPackagesDataTable extends DataTable
{
    public $model_name = 'delivery_packages';

    public function query(DeliveryPackage $model)
    {
        return $this->buildQuery($model);
    }

    protected function getColumns()
    {
        return [
            Column::make('weight')->title('Poids')->addClass('text-right'),
            Column::make('weight_flyer')->title('Flyer')->addClass('text-right'),
            Column::make('weight_packaging')->title('Packaging')->addClass('text-right'),
            $this->makeColumnButtons(),
        ];
    }
}
