package com.njcn.rdms.module.project.dal.mysql.review;

import com.njcn.rdms.framework.mybatis.core.mapper.BaseMapperX;
import com.njcn.rdms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.njcn.rdms.module.project.dal.dataobject.review.RequirementReviewDO;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface RequirementReviewMapper extends BaseMapperX<RequirementReviewDO> {

    default RequirementReviewDO selectByObjectTypeAndRequirementId(String objectType, Long requirementId) {
        return selectOne(new LambdaQueryWrapperX<RequirementReviewDO>()
                .eq(RequirementReviewDO::getObjectType, objectType)
                .eq(RequirementReviewDO::getRequirementId, requirementId));
    }

}
