Car.php 787 字节
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/5/11
 * Time: 11:58
 */

namespace app\index\model;


use think\Model;

class Car extends Model
{
    public function insertData($data){
        $result = $this->insertGetId($data);
        return $result;
    }
    public function updateData($where,$data){
        $result = $this->where($where)->update($data);
        return $result;
    }
    public function selectData($where){
        $data = $this->where($where)->order('createtime desc')->select();
        return $data;
    }
    public function findData($where){
        $data = $this->where($where)->find();
        return $data;
    }
    public function countData($where){
        $result = $this->where($where)->count();
        return $result;
    }
}