package cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.repository;

import cokr.xit.ens.modules.common.ctgy.intgrnbill.support.entity.Bill;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;

public interface BillRepository extends JpaRepository<Bill, Long> {

    @Query("select a from Bill a inner join a.orgMng where a.billUid = :billUid")
    Optional<Bill> findByBillUid(@Param("billUid") String billUid);


}