refactor: 删除未使用的用户管理相关代码

- 移除 user-management 组件
- 删除 Problem 和 User 相关类型定义
- 清理不再需要的配置文件引用
This commit is contained in:
liguang 2025-06-20 17:09:47 +08:00
parent 360399bdfb
commit 759aaae94f
3 changed files with 0 additions and 80 deletions

View File

@ -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 (
<UserTable
config={adminConfig}
data={[]}
/>
)
}
if (userType === "teacher") {
return (
<UserTable
config={teacherConfig}
data={[]}
/>
)
}
if (userType === "guest") {
return (
<UserTable
config={guestConfig}
data={[]}
/>
)
}
if (userType === "problem") {
return (
<UserTable
config={problemConfig}
data={[]}
/>
)
}
return <div> {userType} </div>
}

View File

@ -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;
}

View File

@ -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 {
// 学生特有字段(如有)
}