新增用户注册功能

This commit is contained in:
Cheng Zhou
2025-12-22 21:19:48 +08:00
parent 03fddba406
commit 6ddf9901a0
33 changed files with 1389 additions and 138 deletions
+24 -3
View File
@@ -9,7 +9,7 @@ export interface ApiError {
}
export interface LoginRequest {
username: string;
email: string;
password: string;
}
@@ -19,17 +19,38 @@ export interface LoginResponse {
}
export type UserRole = "PM" | "CRA" | "PV" | "IMP" | "ADMIN";
export type UserStatus = "PENDING" | "ACTIVE" | "REJECTED" | "DISABLED";
export interface UserInfo {
id: string;
username: string;
email: string;
username?: string;
full_name: string;
department: string;
role: UserRole;
is_active: boolean;
status: UserStatus;
is_active?: boolean;
created_at?: string;
approved_at?: string | null;
approved_by?: string | null;
avatar_url?: string | null;
}
export type UserMeResponse = UserInfo;
export interface RegisterRequest {
email: string;
password: string;
full_name: string;
role: Exclude<UserRole, "ADMIN">;
department: string;
}
export interface AdminUserListResponse {
items: UserInfo[];
total: number;
}
export interface Study {
id: string;
code: string;