package com.ecep.contract.ds.contract.repository;

import java.util.Optional;

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

import com.ecep.contract.model.SalesBillVoucher;

@Repository
public interface SalesBillVoucherRepository extends
        // JDBC interfaces
        CrudRepository<SalesBillVoucher, Integer>, PagingAndSortingRepository<SalesBillVoucher, Integer>,
        // JPA interfaces
        JpaRepository<SalesBillVoucher, Integer>, JpaSpecificationExecutor<SalesBillVoucher> {

    Optional<SalesBillVoucher> findByCode(String code);

}
