package com.lanyuanxiaoyao.leopard.core.repository;

import com.lanyuanxiaoyao.leopard.core.entity.FinanceIndicator;
import com.lanyuanxiaoyao.service.template.repository.SimpleRepository;
import com.querydsl.core.types.Predicate;
import java.util.List;
import java.util.Optional;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.stereotype.Repository;

@Repository
public interface FinanceIndicatorRepository extends SimpleRepository<FinanceIndicator> {
  @EntityGraph(attributePaths = {"stock"})
  @Override
  Optional<FinanceIndicator> findOne(Predicate predicate);

  @EntityGraph(attributePaths = {"stock"})
  @Override
  List<FinanceIndicator> findAll(Predicate predicate, Sort sort);
}
