inital commit
This commit is contained in:
54
app/Models/Accident251Point.php
Normal file
54
app/Models/Accident251Point.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Accident251Point extends Model
|
||||
{
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'accident_251_points';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'lat',
|
||||
'lng',
|
||||
'province',
|
||||
'axis_name',
|
||||
'axis_start',
|
||||
'axis_end',
|
||||
'native_name',
|
||||
'operation',
|
||||
'target',
|
||||
'cost',
|
||||
'progress',
|
||||
'end_date',
|
||||
'actions'
|
||||
];
|
||||
|
||||
/**
|
||||
* Get all of the point's files.
|
||||
*/
|
||||
public function files()
|
||||
{
|
||||
return $this->morphMany('App\Models\PointFile', 'point_fileable');
|
||||
}
|
||||
|
||||
public function accident251PointsHistories()
|
||||
{
|
||||
return $this->hasMany('App\Models\Accident251PointsHistory', 'point_id');
|
||||
}
|
||||
|
||||
public function accidentPoint()
|
||||
{
|
||||
return $this->belongsTo('App\Models\AccidentPoint');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user