package com.ywt.outpatient.domain.entity.center;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TeamRepository extends JpaRepository<Team, Integer> {
    /**
     * 获取展示的医生团队
     *
     * @return
     */
    @Query(value = "select * from team where status = 1 and deleted = 0;", nativeQuery = true)
    List<Team> getDisplayList();

    @Query(value = "select * from team where id = ? and deleted = 0;", nativeQuery = true)
    Team getTeam(int id);

}
