1, // 权限配置 - 用于角色权限分配时的选项显示 'permissions' => [ 'User' => [ 'name' => '用户管理', 'actions' => [ 'list' => '查看用户列表', 'create' => '创建用户', 'update' => '编辑用户', 'delete' => '删除用户', 'detail' => '查看用户详情' ] ], 'Player' => [ 'name' => '玩家管理', 'actions' => [ 'list' => '查看玩家列表', 'detail' => '查看玩家详情', 'updateStatus' => '更新玩家状态', 'updateAdjustStatus' => '更新玩家调控状态', 'statistics' => '查看玩家统计', 'batchUpdate' => '批量更新玩家', 'export' => '导出玩家数据' ] ], 'Game' => [ 'name' => '游戏管理', 'actions' => [ 'list' => '查看游戏列表', 'detail' => '查看游戏详情', 'create' => '创建游戏', 'update' => '更新游戏', 'updateStatus' => '更新游戏状态', 'batchUpdate' => '批量更新游戏', 'delete' => '删除游戏', 'statistics' => '查看游戏统计', 'export' => '导出游戏数据' ] ], 'UserRole' => [ 'name' => '角色管理', 'actions' => [ 'list' => '查看角色列表', 'create' => '创建角色', 'update' => '编辑角色', 'delete' => '删除角色', 'detail' => '查看角色详情', 'permissions' => '查看权限配置' ] ], 'Permission' => [ 'name' => '权限管理', 'actions' => [ 'list' => '查看权限配置', 'assign' => '分配权限' ] ], 'Menu' => [ 'name' => '菜单管理', 'actions' => [ 'list' => '查看菜单', 'tree' => '获取菜单树', 'breadcrumb' => '获取面包屑', 'permissions' => '查看菜单权限' ] ], 'Merchant' => [ 'name' => '商户管理', 'actions' => [ 'list' => '查看商户列表', 'create' => '创建商户', 'update' => '编辑商户', 'delete' => '删除商户', 'detail' => '查看商户详情' ] ], 'MerchantAudit' => [ 'name' => '商户审核', 'actions' => [ 'pending' => '查看待审核', 'passed' => '查看已审核', 'approve' => '审核通过', 'reject' => '审核拒绝' ] ], 'Statistics' => [ 'name' => '数据统计', 'actions' => [ 'user' => '用户统计', 'merchant' => '商户统计', 'daily' => '日统计', 'monthly' => '月统计', 'yearly' => '年统计', 'income' => '收入统计', 'users' => '用户数统计' ] ] ], // 默认权限组合(用于快速分配) 'permission_groups' => [ 'viewer' => [ 'name' => '查看者', 'description' => '只有查看权限', 'permissions' => [ 'User' => ['list', 'detail'], 'Player' => ['list', 'detail', 'statistics'], 'Game' => ['list', 'detail', 'statistics'], 'UserRole' => ['list', 'detail'], 'Merchant' => ['list', 'detail'], 'Statistics' => ['user', 'merchant', 'daily', 'monthly', 'yearly'] ] ], 'operator' => [ 'name' => '操作员', 'description' => '有基本的增删改查权限', 'permissions' => [ 'User' => ['list', 'create', 'update', 'detail'], 'Player' => ['list', 'detail', 'updateStatus', 'statistics'], 'Game' => ['list', 'detail', 'updateStatus', 'statistics'], 'UserRole' => ['list', 'detail'], 'Merchant' => ['list', 'create', 'update', 'detail'], 'MerchantAudit' => ['pending', 'passed'], 'Statistics' => ['user', 'merchant', 'daily', 'monthly', 'yearly'] ] ], 'admin' => [ 'name' => '管理员', 'description' => '有完整的管理权限', 'permissions' => [ 'User' => ['list', 'create', 'update', 'delete', 'detail'], 'Player' => ['list', 'detail', 'updateStatus', 'updateAdjustStatus', 'statistics', 'batchUpdate', 'export'], 'Game' => ['list', 'detail', 'create', 'update', 'updateStatus', 'batchUpdate', 'delete', 'statistics', 'export'], 'UserRole' => ['list', 'create', 'update', 'delete', 'detail', 'permissions'], 'Permission' => ['list', 'assign'], 'Menu' => ['list', 'tree', 'breadcrumb', 'permissions'], 'Merchant' => ['list', 'create', 'update', 'delete', 'detail'], 'MerchantAudit' => ['pending', 'passed', 'approve', 'reject'], 'Statistics' => ['user', 'merchant', 'daily', 'monthly', 'yearly', 'income', 'users'] ] ] ] ];