package com.viettel.campaign.repository;

import com.viettel.campaign.model.CustomerList;
import com.viettel.campaign.web.dto.ResultDTO;
import org.springframework.data.jpa.repository.JpaRepository;
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);

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