<?php

namespace App\Models;

use App\Traits\Uuid;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Users extends Model
{
    use Uuid;
    public $incrementing = false;
    protected $table = 'user';

    protected $guarded = [
        'id'
    ];    

    public function rRole()
    {
        return $this->hasOne(Role::class, 'idrole', 'id');
    }

    public function rPegawai()
    {
        return $this->belongsTo(Pegawai::class, 'idpegawai', 'id');
    }
}
