package common.repository;

import common.model.Account4Web;
import common.model.TrackAccount4Web;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import javax.sound.midi.Track;
import java.util.List;

@Transactional
public interface TrackAccount4WebRepository extends JpaRepository<TrackAccount4Web, Long> {

    @Query(value = "SELECT * from account4web where email in ?1", nativeQuery = true)
    List<TrackAccount4Web> findByEmails(List<String> emails);

    @Query(value = "SELECT * from account4web where email = ?1", nativeQuery = true)
    TrackAccount4Web findByEmail(String email);

}
