package com.realnet.stepperworkflow.Repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.realnet.stepperworkflow.Entity.Stepper_workflow;

@Repository
public interface Stepper_workflowRepository extends JpaRepository<Stepper_workflow, Integer> {

	@Query(value = "select * from stepper_workflow where  created_by=?1", nativeQuery = true)
	List<Stepper_workflow> findAll(Long creayedBy);

	@Query(value = "select * from stepper_workflow where  created_by=?1", nativeQuery = true)
	Page<Stepper_workflow> findAll(Pageable page, Long creayedBy);
}