package com.magistr.app.repository;

import com.magistr.app.model.Subject;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface SubjectRepository extends JpaRepository<Subject, Long> {
    Optional<Subject> findByNameIgnoreCase(String name);

    List<Subject> findByDepartmentId(Long departmentId);

    List<Subject> findByStatusNot(String status);

    List<Subject> findByDepartmentIdAndStatusNot(Long departmentId, String status);
}
