<?php

namespace App\Models;

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

class DwbsUser extends Model
{
    use SoftDeletes;
    protected $table='users';
    protected $connection='mysql_dwbs';

    public function recom()
    {
        return $this->belongsTo('App\Models\DwbsUser','recom_id','id')->withTrashed();
    }
    public function agent()
    {
        return $this->belongsTo('App\Models\DwbsUser','agent_id','id')->withTrashed();
    }
    public function warea()
    {
        return $this->belongsTo('App\Models\DwbsWarea','warea_id','id');
    }

    public function GetWareaName(){
        return $this->belongsTo(DwbsWarea::class,'warea_id');
    }
}
