/**
 * 开发者相关类型定义
 */

// 开发者角色
export type DeveloperRole = 'owner' | 'admin' | 'developer' | 'viewer';

// 开发者申请状态
export type ApplyStatus = 'pending' | 'approved' | 'rejected';

// 申请类型
export type ApplyType = 'developer' | 'permission' | 'resource';

// 开发者信息
export interface Developer {
  id: string;
  userId: string;
  userName: string;
  avatar?: string;
  email?: string;
  phone?: string;
  company?: string;
  position?: string;
  experience?: string;
  role: DeveloperRole;
  status: ApplyStatus;
  createTime: string;
  updateTime?: string;
}

// 开发者申请
export interface DeveloperApply {
  id: string;
  userId: string;
  userName: string;
  avatar?: string;
  realName: string;
  phone: string;
  email: string;
  company: string;
  position: string;
  experience: string;
  status: ApplyStatus;
  remark?: string;
  reviewerId?: string;
  reviewerName?: string;
  reviewTime?: string;
  createTime: string;
}

// 权限申请
export interface PermissionApply {
  id: string;
  applicantId: string;
  applicantName: string;
  applicantAvatar?: string;
  type: ApplyType;
  targetId?: string;
  targetName?: string;
  reason?: string;
  status: ApplyStatus;
  reviewerId?: string;
  reviewerName?: string;
  reviewRemark?: string;
  reviewTime?: string;
  createTime: string;
}

// 项目开发者
export interface ProjectDeveloper {
  id: string;
  projectId: string;
  userId: string;
  userName: string;
  avatar?: string;
  role: DeveloperRole;
  createTime: string;
}

// 开发者统计
export interface DeveloperStats {
  total: number;
  active: number;
  pending: number;
  approved: number;
}
