<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RoadObservedHistory extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'previous_rms_status',
        'previous_rms_start_latlng',
        'previous_rms_end_latlng',
        'previous_rms_description',
        'new_files'
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'previous_rms_start_latlng' => 'array',
        'previous_rms_end_latlng' => 'array'
    ];

    public function problem()
    {
        return $this->belongsTo('App\Models\RoadObserved');
    }
}
