<?php

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

/**
 * Class Company
 * @package App\Models
 *
 * @property \App\Models\Country country_id
 * @property \App\Models\State state_id
 * @property \App\Models\District district_id
 * @property string postcode
 * @property string street_one
 * @property string street_two
 * @property integer billing_type
 */
class Company extends AbstractModel
{
    protected $connection = 'exchange_db';

    protected $table = 'companies';

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

}



