<?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 warea()
    {
        return $this->belongsTo('App\Models\DwbsWarea','warea_id','id');
    }

    public function store()
    {
        return $this->belongsTo('App\Models\Store','id','user_id')->withTrashed();
    }

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