package com.goldenchart.repository;

import com.goldenchart.entity.GcPaperPosition;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface GcPaperPositionRepository extends JpaRepository<GcPaperPosition, Long> {
    List<GcPaperPosition> findByAccountIdOrderBySymbolAsc(Long accountId);
    Optional<GcPaperPosition> findByAccountIdAndSymbol(Long accountId, String symbol);
    /** 실시간 손절/익절 — 종목별 보유 포지션 전체 */
    List<GcPaperPosition> findBySymbolAndQuantityGreaterThan(String symbol, java.math.BigDecimal minQty);
}
