<?php

namespace App\Models;

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

class Role extends Model
{
    use HasFactory;
    use Uuid;

    public $incrementing = false;
    protected $keyType = 'uuid';

    protected $table = 'role';

    protected $fillable = ['nama'];

    public function rUser()
    {
        return $this->belongsToMany(Users::class, 'idrole', 'id');
    }
}
