feat(verification): add user identity verification system
Add comprehensive user verification feature including: - VerificationGuideScreen: Guide screen explaining the verification process - VerificationFormScreen: Form for submitting verification applications - VerificationSettingsScreen: Settings page to view verification status - verificationService: API service for verification operations - verificationStore: State management for verification state - DTOs: Types for verification records, status, and admin operations The system supports multiple identity types (student, teacher, staff, alumni, external) and includes both user-facing and admin-facing functionality.
This commit is contained in:
@@ -773,7 +773,80 @@ export function extractTextFromSegments(segments?: MessageSegment[]): string {
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
// ==================== Vote DTOs ====================
|
||||
// ==================== Verification DTOs ====================
|
||||
|
||||
// 用户身份类型
|
||||
export type UserIdentity = 'general' | 'student' | 'teacher' | 'staff' | 'alumni' | 'external';
|
||||
|
||||
// 认证状态
|
||||
export type VerificationStatus = 'not_submitted' | 'pending' | 'approved' | 'rejected';
|
||||
|
||||
// 认证记录
|
||||
export interface VerificationRecordDTO {
|
||||
id: string;
|
||||
user_id: string;
|
||||
identity: UserIdentity;
|
||||
status: VerificationStatus;
|
||||
real_name: string;
|
||||
student_id?: string;
|
||||
employee_id?: string;
|
||||
department?: string;
|
||||
proof_materials: string;
|
||||
reviewed_at?: string;
|
||||
reviewed_by?: string;
|
||||
reject_reason?: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// 认证状态响应
|
||||
export interface VerificationStatusDTO {
|
||||
identity: UserIdentity;
|
||||
verification_status: VerificationStatus;
|
||||
has_pending_request: boolean;
|
||||
latest_record?: VerificationRecordDTO;
|
||||
}
|
||||
|
||||
// 提交认证请求
|
||||
export interface SubmitVerificationRequest {
|
||||
identity: UserIdentity;
|
||||
real_name: string;
|
||||
student_id?: string;
|
||||
employee_id?: string;
|
||||
department?: string;
|
||||
proof_materials: string;
|
||||
}
|
||||
|
||||
// 管理端认证列表项
|
||||
export interface AdminVerificationListItemDTO {
|
||||
id: string;
|
||||
user_id: string;
|
||||
username: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
identity: UserIdentity;
|
||||
status: VerificationStatus;
|
||||
real_name: string;
|
||||
student_id?: string;
|
||||
employee_id?: string;
|
||||
department?: string;
|
||||
created_at: string;
|
||||
reviewed_at?: string;
|
||||
reviewer_name?: string;
|
||||
}
|
||||
|
||||
// 管理端认证详情
|
||||
export interface AdminVerificationDetailDTO extends AdminVerificationListItemDTO {
|
||||
proof_materials: string;
|
||||
reviewed_by?: string;
|
||||
reject_reason?: string;
|
||||
}
|
||||
|
||||
// 审核认证请求
|
||||
export interface ReviewVerificationRequest {
|
||||
approve: boolean;
|
||||
reject_reason?: string;
|
||||
}
|
||||
|
||||
// 投票选项
|
||||
export interface VoteOptionDTO {
|
||||
|
||||
Reference in New Issue
Block a user