package com.sundot.airport.system.mapper.approval;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sundot.airport.system.domain.approval.ApprovalWorkflowDefinition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 审批流程定义Mapper接口
 *
 * @author simon lin
 * @date 2025-09-06
 */
@Mapper
public interface ApprovalWorkflowDefinitionMapper extends BaseMapper<ApprovalWorkflowDefinition> {
    /**
     * 查询审批流程定义
     *
     * @param id 审批流程定义主键
     * @return 审批流程定义
     */
    ApprovalWorkflowDefinition selectApprovalWorkflowDefinitionById(Long id);

    /**
     * 根据流程代码查询审批流程定义
     *
     * @param workflowCode 流程代码
     * @return 审批流程定义
     */
    ApprovalWorkflowDefinition selectApprovalWorkflowDefinitionByCode(@Param("workflowCode") String workflowCode);

    /**
     * 根据流程类型查询审批流程定义列表
     *
     * @param workflowType 流程类型
     * @return 审批流程定义列表
     */
    List<ApprovalWorkflowDefinition> selectApprovalWorkflowDefinitionByType(@Param("workflowType") String workflowType);

    /**
     * 查询审批流程定义列表
     *
     * @param approvalWorkflowDefinition 审批流程定义
     * @return 审批流程定义集合
     */
    List<ApprovalWorkflowDefinition> selectApprovalWorkflowDefinitionList(ApprovalWorkflowDefinition approvalWorkflowDefinition);

    /**
     * 新增审批流程定义
     *
     * @param approvalWorkflowDefinition 审批流程定义
     * @return 结果
     */
    int insertApprovalWorkflowDefinition(ApprovalWorkflowDefinition approvalWorkflowDefinition);

    /**
     * 修改审批流程定义
     *
     * @param approvalWorkflowDefinition 审批流程定义
     * @return 结果
     */
    int updateApprovalWorkflowDefinition(ApprovalWorkflowDefinition approvalWorkflowDefinition);

    /**
     * 删除审批流程定义
     *
     * @param id 审批流程定义主键
     * @return 结果
     */
    int deleteApprovalWorkflowDefinitionById(Long id);

    /**
     * 批量删除审批流程定义
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteApprovalWorkflowDefinitionByIds(Long[] ids);
}