package com.pharmacopoeia.repository;

import com.pharmacopoeia.entity.Brand;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BrandRepository extends JpaRepository<Brand, Integer> {

    List<Brand> findAllByOrderBySortOrderAsc();

    boolean existsByNameAndIdNot(String name, Integer id);

    Brand findByName(String name);
}
