| 1 | <?php |
||
| 9 | class MatchPlayer extends DsManagerOrm |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $table = 'match_players'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $fillable = [ |
||
| 21 | 'match_id', |
||
| 22 | 'team_id', |
||
| 23 | 'player_id', |
||
| 24 | 'goals', |
||
| 25 | 'vote' |
||
| 26 | ]; |
||
| 27 | |||
| 28 | protected $casts = [ |
||
| 29 | 'vote' => 'integer', |
||
| 30 | 'goals' => 'integer' |
||
| 31 | ]; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 35 | */ |
||
| 36 | public function player() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
| 43 | */ |
||
| 44 | public function team() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param $query |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function scopeComplete($query){ |
||
| 59 | |||
| 60 | } |