<?php

namespace app\model;


use think\model\Pivot;
use think\model\relation\HasOne;

class SysRoleMenu extends Pivot
{
    protected $name = "sys_role_menu";
    protected $pk = "id";

    public function role(): HasOne
    {
        return $this->hasOne(SysRole::class);
    }

    public function menu(): HasOne
    {
        return $this->hasOne(SysMenu::class);
    }
}