inital commit
This commit is contained in:
99
app/Models/RoadObserved.php
Normal file
99
app/Models/RoadObserved.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RoadObserved extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'AutoID',
|
||||
'Title',
|
||||
'StartTime',
|
||||
'EndTime',
|
||||
'StartDate',
|
||||
'EndDate',
|
||||
'StartTime_DateTime',
|
||||
'EndTime_DateTime',
|
||||
'fk_RegisteredEventMessage',
|
||||
'fk_Country',
|
||||
'ProvinceName',
|
||||
'fk_Province',
|
||||
'fk_Town',
|
||||
'TownName',
|
||||
'lat',
|
||||
'lng',
|
||||
'XLAM',
|
||||
'YLAM',
|
||||
'WeatherName',
|
||||
'fk_Weather',
|
||||
'EventTypeTitle',
|
||||
'fk_EventType',
|
||||
'FeatureTypeTitle',
|
||||
'fk_FeatureType',
|
||||
'Description',
|
||||
'MobileForSendEventSms',
|
||||
'rms_province_id',
|
||||
'rms_city_id',
|
||||
'handling_way_id',
|
||||
'StartTime_DateTime_fa',
|
||||
'updated_at_fa',
|
||||
'updated_at',
|
||||
'observed_way_id',
|
||||
'rms_last_activity',
|
||||
'rms_last_activity_fa',
|
||||
'image_after',
|
||||
'image_before',
|
||||
// 'handler_type',
|
||||
'edarate_shahri_id',
|
||||
'province_id',
|
||||
'city_id',
|
||||
'province_fa',
|
||||
'city_fa',
|
||||
'rms_status',
|
||||
'status',
|
||||
'status_fa',
|
||||
'supervisor_id',
|
||||
'supervisor_description',
|
||||
'supervising_time',
|
||||
'supervisor_name',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'rms_start_latlng' => 'array',
|
||||
'rms_end_latlng' => 'array'
|
||||
];
|
||||
|
||||
/**
|
||||
* Get all of the project's files.
|
||||
*/
|
||||
public function files()
|
||||
{
|
||||
return $this->morphMany('App\Models\ProjectFile', 'project_fileable');
|
||||
}
|
||||
|
||||
public function problemHistories()
|
||||
{
|
||||
return $this->hasMany('App\Models\RoadObservedHistory', 'problem_id');
|
||||
}
|
||||
|
||||
public function province()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Province', 'rms_province_id');
|
||||
}
|
||||
|
||||
public function city()
|
||||
{
|
||||
return $this->belongsTo('App\Models\City', 'rms_city_id');
|
||||
}
|
||||
|
||||
public function edarateShahri()
|
||||
{
|
||||
return $this->belongsTo('App\Models\EdarateShahri', 'edarate_shahri_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user