package com.ga.core.mapper.commission;

import com.ga.core.vo.commission.ChargebackWaiverRequestResp;
import com.ga.core.vo.commission.ChargebackWaiverRequestSearchParam;
import com.ga.core.vo.commission.ChargebackWaiverRequestVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * chargeback_waiver_request Mapper — 환수 감면 신청 (V122)
 */
@Mapper
public interface ChargebackWaiverRequestMapper {

    ChargebackWaiverRequestResp selectById(@Param("requestId") Long requestId);

    List<ChargebackWaiverRequestResp> selectList(ChargebackWaiverRequestSearchParam param);

    int insert(ChargebackWaiverRequestVO vo);

    /**
     * 승인/반려 처리 — approval_status, approver_id, approved_at, updated_at 갱신.
     */
    int updateApproval(@Param("requestId") Long requestId,
                       @Param("approvalStatus") String approvalStatus,
                       @Param("approverId") Long approverId,
                       @Param("approvedAt") LocalDateTime approvedAt);
}
