<?php

namespace App\Models;

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

class Funcionario extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $dates = ['deleted_at'];

    public function getUser()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }

    public function getCategoria()
    {
        return $this->belongsTo(Categoria::class, 'categoria_id', 'id');
    }

    public function getSector()
    {
        return $this->belongsTo(Sector::class, 'sector_id', 'id');
    }
}
