package com.crunii.micro.domain.repo.main;

import com.crunii.micro.domain.common.BaseRepo;
import com.crunii.micro.domain.entity.main.YcqActivityApplyForm;
import com.crunii.micro.domain.entity.main.YcqActivitySign;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface YcqActivityApplyFormRepo extends BaseRepo<YcqActivityApplyForm, Long> {

    YcqActivityApplyForm findByActivityId(Long id);

    @Modifying
    @Query(value = "UPDATE YCQ_ACTIVITY_APPLY_FORM SET is_delete = 1 WHERE activity_id = ?1", nativeQuery = true)
    int deleteByActivityId(Long id);
}
