StZqOddsRecord.php 834 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * Class StZqOddsRecord
  6. * @package App\Http\Model
  7. * 足球 赔率 记录
  8. */
  9. class StZqOddsRecord extends Model
  10. {
  11. protected $table = 'st_zq_odds_record';
  12. public $timestamps = false;
  13. 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'];
  14. /*
  15. * 获取一段时间内所有的赔率记录
  16. */
  17. public static function getOddsRecordID($models){
  18. $OddsRecord_data = $models['model_odds_record']::select('id','odds_only','source')
  19. ->where([['ctime','>',date('Y-m-d H:i:s' , strtotime("-1 day"))]])
  20. ->get()
  21. ->toArray();
  22. return $OddsRecord_data;
  23. }
  24. }