package com.icomsys.main_vm.db.jpa.repo.system;

import com.icomsys.main_vm.db.jpa.entity.system.TbServiceGrouop;
import com.icomsys.main_vm.db.jpa.entity.system.id.TbServiceGrouopId;
import com.icomsys.main_vm.db.jpa.repo.system.dsl.TbServiceGrouopRepoDsl;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface TbServiceGrouopRepo extends JpaRepository<TbServiceGrouop, TbServiceGrouopId>, TbServiceGrouopRepoDsl {

    List<TbServiceGrouop> findByServiceGroupIn(List<String> service);
    List<TbServiceGrouop> findByServiceGroupInAndServiceGroupUpper(List<String> service, String lastService);
    Optional<TbServiceGrouop> findByServiceGroup(String serviceGroup);
    List<TbServiceGrouop> findByServiceGroupUpperAndServiceType(String serviceGroup, String type);
    List<TbServiceGrouop> findByServiceGroupUpper(String serviceGroup);
    boolean existsByCustCodeAndServiceGroup(String custCode, String service);
    List<TbServiceGrouop> findByServiceType(String type);
    boolean existsByServiceGroup(String service);
    List<TbServiceGrouop> findByCustCodeAndServiceType(String cust,String type);
    List<TbServiceGrouop> findByCustCode(String cust);
    Optional<TbServiceGrouop> findByServiceGroupAndCustCode(String service, String cust);
    TbServiceGrouop findByCustCodeAndServiceGroup(String custCode, String service);

}
