<?php
namespace App\Models;
class GameDiceone_Buy extends BaseModel
{
    protected $table="game_diceone";
    public $timestamps = false;
    //撤单
    function Cancel($where){
        $res=$this->where($where)->where('status',0)->update(['delstatus'=>2]);
        if($res){
            return -5051262422;//作废失败
        }
        return 1;
    }
    function cancel_order($order_id){
        $res=$this->where('order_id',$order_id)->update(['delstatus'=>2]);
        if(!$res){
            return -7021021122;
        }
        return 1;
    }
}
