<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class AbrarPlanProjectHistory extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'previous_type',
        'previous_status',
        'previous_status_progress',
        'previous_status_description',
        'previous_status_date',
        'previous_start_latlng',
        'previous_end_latlng',
        'previous_length',
        'new_files'
    ];

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

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