<?php

namespace App\Models;

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

class Role extends Model
{
    use HasFactory, GlobalModelEvents;

    protected $fillable = [
        'name',
    ];

    public function admins()
    {
        return $this->hasMany(Admin::class, 'role_id', 'id');
    }
}
