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

import com.bio.bio_backend.domain.base.authgroupresource.entity.AuthGroupResource;
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 AuthGroupResourceRepository
                extends JpaRepository<AuthGroupResource, Long>, AuthGroupResourceRepositoryCustom {

        @Modifying
        @Query("delete from AuthGroupResource agr where agr.authGroupOid.oid = :authGroupOid")
        void deleteByAuthGroupOid(@Param("authGroupOid") Long authGroupOid);
}
