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

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.zhongshu.card.client.type.OrganizationUserType;
import com.zhongshu.card.server.core.dao.school.extend.BookInfoDaoExtend;
import com.zhongshu.card.server.core.domain.school.BookInfo;

/**
 * @author TRX
 * @date 2024/3/21
 */
public interface BookInfoDao extends MongoDao<BookInfo>, BookInfoDaoExtend {

    BookInfo findTopById(String id);

    BookInfo findTopByPhoneAndOidAndUserType(String phone, String oid, OrganizationUserType userType);

    BookInfo findTopByCodeAndOidAndUserType(String code, String oid, OrganizationUserType userType);

    BookInfo findTopByIdCardAndOidAndUserType(String idCard, String oid, OrganizationUserType userType);
}
