package cn.van.business.repository;

import cn.van.business.model.wx.WxMessageDataForTransfer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface WxMessageDataForTransferRepository extends JpaRepository<WxMessageDataForTransfer, Integer> {

    // Find transfers by the sender's WeChat ID
    List<WxMessageDataForTransfer> findByFromWxid(String fromWxid);

    // Find a single transfer by its unique transfer ID
    WxMessageDataForTransfer findByTransferid(String transferid);

    // Find transfers by transaction type
    List<WxMessageDataForTransfer> findByTransType(Integer transType);

    // Find transfers that have a specific amount of money
    List<WxMessageDataForTransfer> findByMoney(BigDecimal money);

    // Optional: Find transfers by msgSource, which could represent different sources or contexts of the transactions
    List<WxMessageDataForTransfer> findByMsgSource(Integer msgSource);

    // Optional: Find transfers by their invalid time parameter
    List<WxMessageDataForTransfer> findByInvalidtime(Integer invalidtime);
}
