package com.bio.bio_backend.domain.base.memberauthgroup.repository;

import com.bio.bio_backend.domain.base.memberauthgroup.entity.MemberAuthGroup;
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 org.springframework.stereotype.Repository;

@Repository
public interface MemberAuthGroupRepository
                extends JpaRepository<MemberAuthGroup, Long>, MemberAuthGroupRepositoryCustom {

        @Modifying
        @Query("delete from MemberAuthGroup mag where mag.memberOid.oid = :memberOid")
        void deleteByMemberOid(@Param("memberOid") Long memberOid);
}
