package com.bio.bio_backend.domain.admin.common_code.repository;

import com.bio.bio_backend.domain.admin.common_code.entity.CommonCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

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

@Repository
public interface CommonCodeRepository extends JpaRepository<CommonCode, Long>, CommonCodeRepositoryCustom {
    
    Optional<CommonCode> findByCode(String code);
    
    boolean existsByCode(String code);
    
    boolean existsByGroupCode(String groupCode);
    
    boolean existsByParentCode(String parentCode);
}
