package ${model.basePackage}.repo<#if model.genPackage??>.${model.genPackage}</#if>;

import ${model.basePackage}.domain.<#if model.genPackage??>${model.genPackage}.</#if>${model.className};
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
<#if softDelete == true>
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
</#if>

public interface ${model.className}Repo extends JpaRepository<${model.className}, Long>, JpaSpecificationExecutor<${model.className}> {
<#if softDelete == true>
    @Query("update ${model.className} t set t.enabled = false where t.id = ?1")
    @Modifying
    @Transactional
    void deleteById(Long id);
</#if>
}