<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/13
 * Time: 9:52
 */
namespace Modules\Project\Services;

class BaseService
{
    public $model;

    public function create($data)
    {
        return $this->model = $this->model->create($data);
    }

    public function update($id, $data)
    {
        $this->model = $this->model->find($id);

        return $this->model->update($data);
    }

    public function delete($id)
    {
        $this->model = $this->model->find($id);

        return $this->model->delete($id);
    }
}
