package org.springblade.openapi.mk.api;

import org.springblade.core.tool.api.R;
import org.springblade.openapi.mk.pojo.dto.Api4MKProcessApprovalDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 *  给mk回调的api
 * @author bfhuange
 * @date 2024/9/5
 */
public interface IApi4MK {
    String API_PREFIX = "/openApi/mk";
    String PROCESS_API_PREFIX = API_PREFIX + "/process";
    String PROCESS_FINISH_CALLBACK = PROCESS_API_PREFIX + "/finishCallback";
    String PROCESS_APPROVAL_CALLBACK = PROCESS_API_PREFIX + "/approvalCallback";
    String PROCESS_REJECT_CALLBACK = PROCESS_API_PREFIX + "/rejectCallback";
    String PROCESS_REVOKE_CALLBACK = PROCESS_API_PREFIX + "/revokeCallback";
    String PROCESS_COMMON_CALLBACK = PROCESS_API_PREFIX + "/commonCallback";

    /**
     *  流程通用回调接口
     * @param param
     * @return
     */
    @PostMapping(PROCESS_COMMON_CALLBACK)
    R<Boolean> processCommonCallback(@RequestBody Api4MKProcessApprovalDTO param);

    /**
     *  流程结束回调接口
     * @param param
     * @return
     */
    @PostMapping(PROCESS_FINISH_CALLBACK)
    R<Boolean> processFinishCallback(@RequestBody Api4MKProcessApprovalDTO param);

    /**
     *  流程审批同意回调接口
     * @param param
     * @return
     */
    @PostMapping(PROCESS_APPROVAL_CALLBACK)
    R<Boolean> processApprovalCallback(@RequestBody Api4MKProcessApprovalDTO param);

    /**
     *  流程审批拒绝回调接口
     * @param param
     * @return
     */
    @PostMapping(PROCESS_REJECT_CALLBACK)
    R<Boolean> processRejectCallback(@RequestBody Api4MKProcessApprovalDTO param);

    /**
     *  流程撤销回调接口
     * @param param
     * @return
     */
    @PostMapping(PROCESS_REVOKE_CALLBACK)
    R<Boolean> processRevokeCallback(@RequestBody Api4MKProcessApprovalDTO param);
}
