<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CMMS_Forms_histories extends Model
{
    protected $table = 'cmms_forms_histories';

    protected $fillable = [
        'cmms_form_id',
        'user_id',
        'previous_chassis_number',
        'previous_province_id',
        'previous_province_fa',
        'previous_city_id',
        'previous_city_fa',
        'previous_gps_code',
        'previous_device_name',
        'previous_operator_name',
        'previous_operator_nationalcode',
        'previous_operator_phone',
        'previous_image1',
        'previous_image2',
        'previous_image3',
        'previous_file1',
        'previous_form_number'
    ];

    public function cmms_form()
    {
        return $this->belongsTo(CMMS_Form::class, 'cmms_form_id');
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
