/**
 * 员工角色/状态等枚举映射
 * 后端字典独立表 edu_dict, 前端直接用本地常量映射, 避免依赖 sys_dict
 */
export const staffRoleOptions = [
  { label: '课程顾问', value: 'SALES', elTagType: 'success' },
  { label: '管家(学管)', value: 'HOUSEKEEPER', elTagType: 'primary' },
  { label: '辅导老师', value: 'TUTOR', elTagType: 'warning' },
  { label: '文书老师', value: 'DOC_WRITER', elTagType: 'info' },
  { label: '申请老师', value: 'APPLY_TEACHER', elTagType: 'success' },
  { label: '学业规划导师', value: 'ACADEMIC_PLANNER', elTagType: 'primary' },
  { label: '专业规划导师', value: 'MAJOR_PLANNER', elTagType: 'warning' },
  { label: '兼职管家', value: 'PART_TIME_HOUSEKEEPER', elTagType: 'info' }
];

export const staffStatusOptions = [
  { label: '在职', value: '0', elTagType: 'success' },
  { label: '离职', value: '1', elTagType: 'danger' },
  { label: '休假', value: '2', elTagType: 'warning' }
];

export interface StaffVO extends BaseEntity {
  id: number | string;
  userId: number | string;
  staffNo: string;
  name: string;
  role: string;
  phone: string;
  email: string;
  wechat: string;
  gender: string;
  idCard: string;
  entryDate: string;
  leaveDate: string;
  subject: string;
  title: string;
  maxStudents: number;
  commissionRate: number;
  baseSalary: number;
  bankAccount: string;
  majorErrorCount: number;
  emergencyContact: string;
  emergencyPhone: string;
  deptId: number | string;
  deptName: string;
  intro: string;
  avatar: string;
  status: string;
  remark: string;
}

export interface StaffForm {
  id: number | string | undefined;
  userId: number | string | undefined;
  staffNo: string;
  name: string;
  role: string;
  phone: string;
  email: string;
  wechat: string;
  gender: string;
  idCard: string;
  entryDate: string;
  leaveDate: string;
  subject: string;
  title: string;
  maxStudents: number;
  commissionRate: number;
  baseSalary: number;
  bankAccount: string;
  majorErrorCount: number;
  emergencyContact: string;
  emergencyPhone: string;
  deptId: number | string | undefined;
  intro: string;
  avatar: string;
  status: string;
  remark: string;
}

export interface StaffQuery extends PageQuery {
  staffNo: string;
  name: string;
  role: string;
  phone: string;
  subject: string;
  status: string;
  deptId: number | string;
}

export interface StaffAssignForm {
  staffId: number | string;
  staffRole: string;
  studentIds: (number | string)[];
}
