2019-07-11 20:55:45 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class VehicleScores extends Model
|
|
|
|
{
|
|
|
|
protected $table = 'vehicle_scores';
|
|
|
|
protected $fillable = [
|
|
|
|
'judge',
|
|
|
|
'overall_score',
|
|
|
|
'vehicle',
|
|
|
|
'created_at',
|
|
|
|
'updated_at'
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $dates = [
|
|
|
|
'created_at',
|
|
|
|
'updated_at'
|
|
|
|
];
|
|
|
|
|
|
|
|
public function judge()
|
|
|
|
{
|
2022-08-08 21:01:59 -04:00
|
|
|
return $this->belongsTo('App\Models\Judges', 'judge', 'id');
|
2019-07-11 20:55:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function scoredVehicle()
|
|
|
|
{
|
2022-08-08 20:58:29 -04:00
|
|
|
return $this->hasMany(Vehicles::class, 'owner');
|
2019-07-11 20:55:45 -04:00
|
|
|
}
|
|
|
|
}
|