package com.example.springip.lab3.dao;

import com.example.springip.lab3.models.Employee;
import com.example.springip.lab3.models.Position;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

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

public interface EmployeeRepository extends JpaRepository<Employee, Long> {
    Optional<Employee> findById(Long id);
    List<Employee> findByPositions_Id(Long p_id);
    List<Employee> findByCompanyIsNull();
}
