<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Jenssegers\Mongodb\Auth\User as Authenticatable;
use Jenssegers\Mongodb\Eloquent\SoftDeletes;

class DealerLaravel extends Authenticatable 
{
    //
    use Notifiable;
    use SoftDeletes;
    
    protected $connection = 'mongodb';
    protected $collection = 'dealer';
    protected $guard = 'ds';

    protected $guarded = ['_id'];
    
    protected $hidden = [
        'password', 'remember_token',
    ];

    public function dealerdetaillaravel() {
        return $this->hasOne('App\Model\DealerDetailLaravel','_id','company_id');
    }

   public function companylaravel() {
        return $this->belongsTo('App\Model\CompanyLaravel','company_id','_id');
    } 
} 
