package com.zioinfo.hrm.employee;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface EmployeeMapper {
    List<Employee> findAll(@Param("keyword") String keyword,
                           @Param("deptId") Long deptId,
                           @Param("status") String status,
                           @Param("offset") int offset,
                           @Param("limit") int limit);
    long countAll(@Param("keyword") String keyword, @Param("deptId") Long deptId, @Param("status") String status);
    Employee findById(@Param("id") Long id);
    Employee findByEmpNo(@Param("empNo") String empNo);
    String getLastEmpNo();
    int insert(Employee emp);
    int update(Employee emp);
    int updateStatus(@Param("id") Long id, @Param("status") String status, @Param("retireDate") java.time.LocalDate retireDate);
    List<Map<String, Object>> getCareerList(@Param("empId") Long empId);
    int insertCareer(Map<String, Object> career);
    int deleteCareer(@Param("id") Long id);
    List<Map<String, Object>> getCertList(@Param("empId") Long empId);
    int insertCert(Map<String, Object> cert);
    int deleteCert(@Param("id") Long id);
}
