| 1 | <?php |
||
| 9 | class MatchResult extends DsManagerOrm |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $table = 'matches'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $fillable = [ |
||
| 20 | 'goal_home', |
||
| 21 | 'goal_away', |
||
| 22 | 'info', |
||
| 23 | 'simulated' |
||
| 24 | ]; |
||
| 25 | |||
| 26 | protected $hidden = [ |
||
| 27 | 'home_team_id', |
||
| 28 | 'away_team_id', |
||
| 29 | 'created_at', |
||
| 30 | 'updated_at' |
||
| 31 | ]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var array |
||
| 35 | */ |
||
| 36 | protected $casts = [ |
||
| 37 | 'info' => 'json', |
||
| 38 | 'simulated' => 'boolean' |
||
| 39 | ]; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 43 | */ |
||
| 44 | public function homeTeam() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 51 | */ |
||
| 52 | public function awayTeam() |
||
| 56 | } |