JobModel.php 646 字节
<?php
/**
 * Created by PhpStorm.
 * auther: sgj
 * Date: 2018/12/4
 * Time: 14:49
 */

namespace app\admin\model;
use think\Model;
use traits\model\SoftDelete;

class JobModel  extends Model
{
    use SoftDelete;
    protected  $deleteTime = 'delete_time';
    protected $insert =['addtime'];

    public function getJob($jobId=''){
        if (!empty($jobId)){
            $map['id']=$jobId;
        }else{
            $map='';
        }
        $job=$this->where($map)->select();
        return $job;
    }

   public function addJob($name){
        $data['name']=$name;
        $return=$this->insert($data);
        return $return;
   }




}