package com.its.op.dao.repository.its.scrs;

import com.its.op.entity.its.scrs.TbScIxrPhas;
import com.its.op.entity.its.scrs.TbScIxrPhasKey;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbScIxrPhasRepository extends JpaRepository<TbScIxrPhas, TbScIxrPhasKey>, JpaSpecificationExecutor<TbScIxrPhas> {

//    @Query("select p from TbScIxrPhas p")
//    List<TbScIxrPhas> findAll();

    @Query("select p from TbScIxrPhas p")
    List<TbScIxrPhas> findAllList();

    @Query("select p from TbScIxrPhas p where p.sgnlIxrNmbr = :sgnlIxrNmbr")
    List<TbScIxrPhas> findListById(@Param("sgnlIxrNmbr") Integer sgnlIxrNmbr);
}
