package com.example.system.repository;

import com.example.system.model.InformationTable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface InformationRepository extends JpaRepository<InformationTable, Long> {
    List<InformationTable> findByUserId(Long userId);

    @Query("SELECT i FROM InformationTable i WHERE i.personalInfo = :personalInfo")
    InformationTable findByPersonalInfo(String personalInfo);
}
