statistiko events
This commit is contained in:
1 parent
c1b5adb3a4
commit
3d9239737f
29 files changed
+466
-767
No files matched your search
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use MongoDB\Laravel\Eloquent\Model;
|
||||
|
||||
class StatistikoEvent extends Model
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
protected $table = 'events';
|
||||
|
||||
protected $fillable = [
|
||||
'sport_id',
|
||||
'league_id',
|
||||
'home_id',
|
||||
'away_id',
|
||||
'starttime',
|
||||
'season',
|
||||
'gls_h',
|
||||
'gls_a',
|
||||
'crn_h',
|
||||
'fls_h',
|
||||
'ofs_h',
|
||||
'snt_h',
|
||||
'tsh_h',
|
||||
'crd_h',
|
||||
'crn_a',
|
||||
'fls_a',
|
||||
'ofs_a',
|
||||
'snt_a',
|
||||
'tsh_a',
|
||||
'crd_a',
|
||||
'expgoalshome_value',
|
||||
'expgoalsaway_value',
|
||||
'exp_handicap',
|
||||
'exp_total',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'starttime' => 'date',
|
||||
];
|
||||
}
|
||||
|
||||
public function league(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CompetitionGroup::class, 'league_id', 'id');
|
||||
}
|
||||
|
||||
public function home(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'home_id', 'id');
|
||||
}
|
||||
|
||||
public function away(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Element::class, 'away_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user