<?php

namespace App\Models;

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

class DepCliente extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $dates = ['deleted_at']; 
    protected $table="departamentosclientes";

    public function getCliente()
    {
        return $this->belongsTo(Cliente::class, 'cliente_id', 'id');
    }
    
    public function getOrgao(){
         return $this->hasOne(OrgaosDeEstrutura::class,'id','orgaosdeestrutura_id');
    }
}
