package com.yihu.jw.base.dao.doctor;

import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDictDO;
import com.yihu.jw.entity.hospital.message.BaseBannerDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface BaseDoctorRoleDictDao extends PagingAndSortingRepository<BaseDoctorRoleDictDO, String>, JpaSpecificationExecutor<BaseDoctorRoleDictDO> {
    @Query(value = "select * from base_doctor_role_dict where name = ?1",nativeQuery = true)
    List<BaseDoctorRoleDictDO> getByname(String name);
    boolean existsByCode(String code);
    boolean existsByName(String name);
}
