package common.repository;

import common.model.Contract;
import common.model.ContractChange;
import common.model.ContractMoney;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface ContractMoneyRepository extends JpaRepository<ContractMoney, Long> {

    @Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 and contract_code = ?3  order by ds desc",nativeQuery=true)
    List<ContractMoney> findByDs(String startDate, String endDate, String code);
}
