From 759aaae94ffc0a2e49752b74dba4d8272590e732 Mon Sep 17 00:00:00 2001 From: liguang <1590686939@qq.com> Date: Fri, 20 Jun 2025 17:09:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 user-management 组件 - 删除 Problem 和 User 相关类型定义 - 清理不再需要的配置文件引用 --- src/features/user-management/index.tsx | 49 -------------------------- src/types/problem.ts | 12 ------- src/types/user.ts | 19 ---------- 3 files changed, 80 deletions(-) delete mode 100644 src/features/user-management/index.tsx delete mode 100644 src/types/problem.ts delete mode 100644 src/types/user.ts diff --git a/src/features/user-management/index.tsx b/src/features/user-management/index.tsx deleted file mode 100644 index 56cb577..0000000 --- a/src/features/user-management/index.tsx +++ /dev/null @@ -1,49 +0,0 @@ -"use client" - -import { UserTable } from "./components/user-table" -import { adminConfig } from "./config/admin" -import { teacherConfig } from "./config/teacher" -import { guestConfig } from "./config/guest" -import { problemConfig } from "./config/problem" - -interface UserManagementProps { - userType: "admin" | "teacher" | "guest" | "problem" -} - -export function UserManagement({ userType }: UserManagementProps) { - // 根据用户类型返回对应的配置 - if (userType === "admin") { - return ( - - ) - } - if (userType === "teacher") { - return ( - - ) - } - if (userType === "guest") { - return ( - - ) - } - if (userType === "problem") { - return ( - - ) - } - - return
暂不支持 {userType} 类型
-} \ No newline at end of file diff --git a/src/types/problem.ts b/src/types/problem.ts deleted file mode 100644 index e236c91..0000000 --- a/src/types/problem.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface Problem { - id: string; - displayId: number; - difficulty: string; - isPublished: boolean; - isTrim: boolean; - timeLimit: number; - memoryLimit: number; - userId?: string | null; - createdAt: string; - updatedAt: string; -} \ No newline at end of file diff --git a/src/types/user.ts b/src/types/user.ts deleted file mode 100644 index 02c3965..0000000 --- a/src/types/user.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface UserBase { - id: string; - name?: string; - email: string; - password?: string; - role?: string; - createdAt: string; - updatedAt?: string; -} - -export interface Admin extends UserBase { - // 管理员特有字段(如有) -} -export interface Teacher extends UserBase { - // 教师特有字段(如有) -} -export interface Guest extends UserBase { - // 学生特有字段(如有) -} \ No newline at end of file