<?php
namespace App\Models;
class Og_backwater extends BaseModel {
	protected $table = "og_backwater";
	public $timestamps = false;


    function getback_log($list = 10, $where = '') {
        $data = $this->orderBy('pass_time', 'desc');
        if (!empty($where) && is_array($where)) {
            $data = $data->where($where);
        }
        $data = $data->paginate($list);

        if (!$data) {
            return -4010010022; //没有数据
        }
        return $data->toArray();
    }

	//插入回水记录
    function backMoney($data){
	    $res=$this->insert($data);
	    
	    if(!$res){
	        return -5010262202;//反水失败
        }
        return 1;
    }
    
}