package com.kamco.cd.training.postgres.repository.code;

import com.kamco.cd.training.postgres.entity.CommonCodeEntity;
import jakarta.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Optional;

public interface CommonCodeRepositoryCustom {
  Optional<CommonCodeEntity> findByCodeId(Long id);

  Optional<CommonCodeEntity> findByCode(String code);

  List<CommonCodeEntity> findByAll();

  Optional<String> getCode(String parentCodeCd, String childCodeCd);

  Long findByParentIdCodeExists(Long parentId, @NotEmpty String code);
}
