<?php

namespace App\Models\Members;

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

/**
 * @mixin IdeHelperUserMenuPermission
 */
class UserMenuPermission extends Model
{
    protected $fillable = [
        'user_id', 'menu_id', 'access', 'read', 'write', 'export', 'approve',
    ];

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

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