<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property $id
 * @property $role_id
 * @property $tool_id
 * @property $tool_option_id
 * @property $created_at
 * @property $updated_at
 */

class RoleToolRelation extends Model
{
    protected $table = 'roles_tools_relations';
    use SoftDeletes;

    public function tool()
    {
        return $this->hasOne(Tool::class, 'id', 'tool_id');
    }

    public function toolOption()
    {
        return $this->hasOne(ToolAdditionalOption::class, 'id', 'tool_option_id');
    }
}