<?php

namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class RepairDevice extends BaseModel
{
    use SoftDeletes;

    public function parts()
    {
        return $this->hasMany('App\Models\Part', 'repair_device_id');
    }

    public function user()
    {
        return $this->belongsTo('App\Models\User', 'user_id');
    }

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

    public function inner_device()
    {
        return $this->belongsTo('App\Models\InnerDevice', 'inner_device_id');
    }

    public function work_point()
    {
        return $this->belongsTo('App\Models\WorkPoint', 'work_point_id');
    }
}
