package com.zhongshu.card.server.core.dao.school;

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.zhongshu.card.client.type.DictInfoType;
import com.zhongshu.card.server.core.dao.school.extend.DictInfoDaoExtend;
import com.zhongshu.card.server.core.domain.school.DictInfo;

import java.util.List;

/**
 * 字典Dao
 *
 * @author TRX
 * @date 2024/3/21
 */
public interface DictInfoDao extends MongoDao<DictInfo>, DictInfoDaoExtend {

    DictInfo findTopById(String id);

    DictInfo findTopByNameAndProjectOidAndDictInfoType(String name, String projectOid, DictInfoType dictInfoType);

    DictInfo findTopByNameAndOidAndDictInfoType(String name, String oid, DictInfoType dictInfoType);

    List<DictInfo> findByOidAndDictInfoTypeOrderBySortAsc(String oid, DictInfoType dictInfoType);
}
