33 lines
501 B
PHP
33 lines
501 B
PHP
<?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()
|
|
{
|
|
return $this->belongsTo(Judges::class, 'judge');
|
|
}
|
|
|
|
public function scoredVehicle()
|
|
{
|
|
return $this->hasMany(Vehicles::class, 'owner');
|
|
}
|
|
}
|