<?php
namespace App\Models;
use DB;

class SixlotteryBuy extends BaseModel {
	protected $table = "game_sixlottery_buy";
	public $timestamps = false;
	
	//获取注单信息
	function getBetInfo($where) {
		$data = $this->select('codes')->where($where)->get();
		if (!$data) {
			return -503000102; //没有订单数据
		}
		return $data->toArray();
	}
	//更新购买状态
	protected function updateDatas($no){
        $res=$this->where('no',$no)->where('status',0)->update(['status'=>2]);
        if(!$res){
            return -503123102;
        }
        return 1;
    }
	
}
