package com.ajb.car.quotation.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ajb.car.entity.quotation.AgPoQuotation;

@Repository 
public interface AgPoQuotationRepository extends JpaRepository<AgPoQuotation, Long>,JpaSpecificationExecutor<AgPoQuotation>  {

	/***
	 * mock find  10
	 */
	@Query(value="select * from ${context.tableName} t  limit 10 ", nativeQuery=true)
	List<AgPoQuotation> findAll();
	
	@Query(value="select * from ag_po_quotation t  where quote_no=?1 ", nativeQuery=true)
	AgPoQuotation findByQuoteNo(String quoteNo);
}
