<?php

namespace App\Filters;

use Essa\APIToolKit\Filters\QueryFilters;

class ReceivingFilters extends QueryFilters
{
    protected array $allowedFilters = [];

    protected array $columnSearch = [
        "receiving_date",
        "supplier",
        "type",
        "mode",
        "remarks",
    ];

    public function status($status)
    {
        return $this->builder->when($status == "inactive", function ($query) {
            $query->onlyTrashed();
        });
    }
}
