package com.viettel.campaign.repository;

import com.viettel.campaign.model.CustomerList;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CustomerListRepository extends JpaRepository<CustomerList, Long> {
    CustomerList findCustomerListByCustomerListId(long customerListId);

    @Modifying
    @Query("delete from CustomerList c where c.customerListId in (:ids)")
    int deleteIds(@Param("ids") List<Long> ids);
}
