<?php

namespace App\Models\Exchange;

use App\Models\AbstractModel;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class User extends AbstractModel {

    protected $connection = 'exchange_db';

    /**
     * @return belongsToMany
     */
    public function company(): belongsToMany
    {
        return $this->belongsToMany(Company::class, (new Employee())->getTable(), 'user_id', 'company_id');
    }
}
