/**
 * 管理员角色
 */
export enum AdminRole {
  SUPER_ADMIN = 'SUPER_ADMIN',
  ADMIN = 'ADMIN',
  OPERATOR = 'OPERATOR',
  VIEWER = 'VIEWER',
}

/**
 * 角色权限映射
 */
export const ROLE_PERMISSIONS: Record<AdminRole, string[]> = {
  [AdminRole.SUPER_ADMIN]: ['*'],
  [AdminRole.ADMIN]: [
    'knowledge:*',
    'experience:*',
    'user:read',
    'conversation:read',
    'statistics:*',
    'admin:read',
  ],
  [AdminRole.OPERATOR]: [
    'knowledge:read',
    'knowledge:create',
    'knowledge:update',
    'experience:read',
    'experience:approve',
    'user:read',
    'conversation:read',
    'statistics:read',
  ],
  [AdminRole.VIEWER]: [
    'knowledge:read',
    'experience:read',
    'user:read',
    'conversation:read',
    'statistics:read',
  ],
};
