feat: 重构管理员权限管理,移除 AdminPermission 模型,整合权限与角色管理逻辑,优化 API 接口以支持角色与权限的同步,增强数据库填充器以对齐权限配置
This commit is contained in:
25
app/Models/AdminMenuAction.php
Normal file
25
app/Models/AdminMenuAction.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class AdminMenuAction extends Model
|
||||
{
|
||||
protected $table = 'admin_menu_actions';
|
||||
|
||||
protected $fillable = [
|
||||
'menu_id',
|
||||
'action_id',
|
||||
'permission_code',
|
||||
'name',
|
||||
'status',
|
||||
];
|
||||
|
||||
/** @return BelongsTo<AdminMenu, AdminMenuAction> */
|
||||
public function menu(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AdminMenu::class, 'menu_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user