新增用户注册功能
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user