package com.bytesw.bytebot.repository;

import com.bytesw.bytebot.etl.model.GoalForActions;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

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

public interface GoalForActionsRepository extends CrudRepository<GoalForActions, Long>, JpaSpecificationExecutor<GoalForActions> {

    @Query("select s from GoalForActions s where s.goalId= :goalId")
    Optional<List<GoalForActions>> findGoalForActionsByGoalId(@Param("goalId") Long goalId);

}
