<?php

namespace App\Services;

use App\CustomerLogStatus;
use App\Traits\ServiceAppAop;


class CustomerLogStatusService
{
    use ServiceAppAop;
    protected $modelClass=CustomerLogStatus::class;
    public function update(array $params, array $values)
    {
        $query = CustomerLogStatus::query();
        foreach ($params as $column=>$param){
            if (is_array($param))$query->whereIn($column,$param);
            else $query->where($column,$param);
        }
        return $query->update($values);
    }

    public function create(array $values)
    {
        return CustomerLogStatus::query()->create($values);
    }

    public function destroy($id)
    {
        return CustomerLogStatus::destroy($id);
    }

    public function getSelection(array $column = ["id","name"])
    {
        return CustomerLogStatus::query()->get($column);
    }
}
