27 lines
526 B
PHP
27 lines
526 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AccidentPoint extends Model
|
|
{
|
|
/**
|
|
* Get all of the point's files.
|
|
*/
|
|
public function files()
|
|
{
|
|
return $this->morphMany('App\Models\PointFile', 'point_fileable');
|
|
}
|
|
|
|
public function accidentPointHistories()
|
|
{
|
|
return $this->hasMany('App\Models\AccidentPointHistory', 'point_id');
|
|
}
|
|
|
|
public function accident251Point()
|
|
{
|
|
return $this->hasOne('App\Models\Accident251Point');
|
|
}
|
|
}
|