package com.zioinfo.hrm.recruitment;

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

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

@Mapper
public interface RecruitmentMapper {
    List<Map<String, Object>> findPostings(@Param("status") String status, @Param("keyword") String keyword,
                                            @Param("offset") int offset, @Param("limit") int limit);
    long countPostings(@Param("status") String status, @Param("keyword") String keyword);
    Map<String, Object> findPostingById(@Param("id") Long id);
    int insertPosting(Map<String, Object> posting);
    int updatePosting(Map<String, Object> posting);
    int updatePostingStatus(@Param("id") Long id, @Param("status") String status);
    List<Map<String, Object>> findApplicants(@Param("postingId") Long postingId, @Param("status") String status);
    Map<String, Object> findApplicantById(@Param("id") Long id);
    int insertApplicant(Map<String, Object> applicant);
    int updateApplicantStatus(@Param("id") Long id, @Param("status") String status, @Param("memo") String memo);
    List<Map<String, Object>> findInterviews(@Param("postingId") Long postingId, @Param("applicantId") Long applicantId);
    int insertInterview(Map<String, Object> interview);
    int updateInterview(Map<String, Object> interview);
}
