<?php
namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * Class StZqOddsRecord
 * @package App\Http\Model
 * 足球 赔率 记录
 */
class StZqOddsRecord extends Model
{
    protected $table = 'st_zq_odds_record';
    public $timestamps = false;
    protected $fillable = ['match_id','others_match_id','odds_code','status','sort','p_code','odds','condition','odds_only','source','type','team','lg_id','others_lg_id','ctime','utime'];


    /*
     * 获取一段时间内所有的赔率记录
     */
    public static function getOddsRecordID($models){
        $OddsRecord_data = $models['model_odds_record']::select('id','odds_only','source')
            ->where([['ctime','>',date('Y-m-d H:i:s' , strtotime("-1 day"))]])
            ->get()
            ->toArray();
        return $OddsRecord_data;
    }

}