package com.yolo.keyboard.dal.mysql.aicompanion;

import java.util.*;

import com.yolo.keyboard.dal.dataobject.aicompanion.AiCompanionI18nDO;
import com.yolo.keyboard.framework.common.pojo.PageResult;
import com.yolo.keyboard.framework.common.pojo.PageParam;
import com.yolo.keyboard.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yolo.keyboard.framework.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * AI陪聊角色国际化表，用于存储不同语言下的角色名称、一句话描述和详细介绍 Mapper
 *
 * @author ziin
 */
@Mapper
public interface AiCompanionI18nMapper extends BaseMapperX<AiCompanionI18nDO> {

    default PageResult<AiCompanionI18nDO> selectPage(PageParam reqVO, Long id) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AiCompanionI18nDO>()
            .eq(AiCompanionI18nDO::getCompanionId, id)
            .orderByDesc(AiCompanionI18nDO::getId));
    }

    default int deleteById(Long id) {
        return delete(AiCompanionI18nDO::getId, id);
    }

	default int deleteByIds(List<Long> ids) {
	    return deleteBatch(AiCompanionI18nDO::getId, ids);
	}

}