// 员工管理相关类型定义

export interface Employee {
  id: string;
  enterpriseId: string;
  enterpriseName: string;
  username: string;
  name: string;
  phone: string;
  email?: string;
  department?: string;
  position?: string;
  roleIds: string[];
  roles?: string[];
  status: UserStatus;
  createdAt: string;
  updatedAt: string;
  lastLoginTime?: string;
}

export type UserStatus = 'active' | 'inactive' | 'frozen';

export interface Role {
  id: string;
  name: string;
  code: string;
  description?: string;
  type: RoleType;
  menuIds: string[];
  permissionIds: string[];
  defaultHomePage?: string;
  status: 'active' | 'inactive';
  createdAt: string;
  updatedAt: string;
}

export type RoleType = 'system' | 'custom';

// 统计数据
export interface EmployeeManagementStats {
  label: string;
  value: number;
  color: string;
  bg: string;
}

// 筛选条件
export interface EmployeeFilters {
  searchKeyword: string;
  statusFilter: string;
}

// 表单数据
export interface EmployeeFormData {
  username?: string;
  name?: string;
  phone?: string;
  email?: string;
  department?: string;
  position?: string;
  enterpriseId?: string;
  enterpriseName?: string;
  status?: UserStatus;
  roleIds?: string[];
}