// 用户相关类型定义

export type UserRole = 'super_admin' | 'operator' | 'analyst';

export interface User {
  id: string;
  email: string;
  username: string;
  nickname: string;
  avatar: string;
  role: UserRole;
  status: 'active' | 'inactive';
  createdAt: string;
  lastLoginAt: string;
}

export interface UserListItem {
  accountId: string;
  avatar: string;
  nickname: string;
  personalAdoptions: number;
  teamAddresses: number;
  teamAdoptions: number;
  provincialAdoptions: {
    count: number;
    percentage: number;
  };
  cityAdoptions: {
    count: number;
    percentage: number;
  };
  referrerId: string;
  ranking: number | null;
  selfPrePlantingPortions: number;
  teamPrePlantingPortions: number;
  status: 'active' | 'inactive';
  isOnline: boolean;
}

export interface UserFilters {
  keyword?: string;
  province?: string;
  city?: string;
  status?: 'active' | 'inactive';
  rankRange?: [number, number];
  adoptionRange?: [number, number];
}

export interface UserDetail extends UserListItem {
  email: string;
  phone: string;
  registeredAt: string;
  province: string;
  city: string;
  walletAddress: string;
}
