package com.yhy.module.core.dal.mysql.workbench;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yhy.module.core.dal.dataobject.workbench.ProgressPaymentModeDO;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

/**
 * 进度款模式 Mapper
 *
 * @author yhy
 */
@Mapper
public interface ProgressPaymentModeMapper extends BaseMapperX<ProgressPaymentModeDO> {

    /**
     * 根据项目ID查询进度款模式列表（按期数升序）
     */
    default List<ProgressPaymentModeDO> selectListByProjectId(Long projectId) {
        return selectList(new LambdaQueryWrapperX<ProgressPaymentModeDO>()
                .eq(ProgressPaymentModeDO::getProjectId, projectId)
                .orderByAsc(ProgressPaymentModeDO::getPeriodNumber));
    }
}
