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

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

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

@Repository
public interface CommonGroupCodeRepository extends JpaRepository<CommonGroupCode, Long> {
    
    Optional<CommonGroupCode> findByCode(String code);
    
    List<CommonGroupCode> findByUseFlagOrderBySortOrderAsc(Boolean useFlag);
    
    boolean existsByCode(String code);
}
