package common.repository;

import common.model.TkioFlowHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

public interface TkioFlowHistoryRepository extends JpaRepository<TkioFlowHistory, Long> {

    @Transactional
    @Modifying
    @Query(value = " insert  into  tkio_flow_history  select * from tkio_flow where email = ?1 and cost_flow > 0 ", nativeQuery = true)
    void backDatasByEmail(String email);
}
