<?php

namespace App\Models;

class OrderDevice extends BaseModel
{
    public function device()
    {
        return $this->belongsTo('App\Models\Device', 'device_id');
    }

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

    public function device_name()
    {
        return $this->belongsTo('App\Models\DeviceName', 'device_name_id');
//        return $this->hasOne(InnerDeviceNamesModel::class,'id','device_name_id');
    }

    public function spec()
    {
        return $this->belongsTo('App\Models\Spec', 'spec_id');
    }

    public function rent_type()
    {
        return $this->belongsTo('App\Models\RentType', 'rent_type_id');
    }

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

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

    public function order()
    {
        return $this->belongsTo('App\Models\Order', 'order_id');
    }
}
