package com.viettel.campaign.repository;

import com.viettel.campaign.model.CustomerListMapping;
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;

public interface CustomerListMappingRepository extends JpaRepository<CustomerListMapping, Long> {

    @Modifying
    @Query("delete from CustomerListMapping c where c.customerListId=:customerListId")
    int deleteMappingByCustomerListId(@Param("customerListId") Long customerListId);
}
