<?php

namespace App\Models\Permissions;

use App\Models\Commons\IdeHelperRoleMenuPermission;
use App\Models\Commons\Menu;
use Illuminate\Database\Eloquent\Model;

/**
 * @mixin IdeHelperRoleMenuPermission
 */
class RoleMenuPermission extends Model
{
    protected $fillable = [
        'role_id', 'menu_id', 'access', 'read', 'write', 'export', 'approve',
    ];

    public function role()
    {
        return $this->belongsTo(Role::class, 'role_id');
    }

    public function menu()
    {
        return $this->belongsTo(Menu::class, 'menu_id');
    }
}
