package com.sb.web.account.mapper; import com.sb.web.account.domain.Budget; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 예산 매퍼. 모든 동작은 member_id(소유자)로 격리. */ @Mapper public interface BudgetMapper { List findByMember(@Param("memberId") Long memberId); Budget findByIdAndMember(@Param("id") Long id, @Param("memberId") Long memberId); int countByCategory(@Param("memberId") Long memberId, @Param("category") String category, @Param("excludeId") Long excludeId); int insert(Budget budget); int update(Budget budget); int delete(@Param("id") Long id, @Param("memberId") Long memberId); /** 분류 이름 변경 시 예산 일괄 갱신 */ int renameCategory(@Param("memberId") Long memberId, @Param("oldName") String oldName, @Param("newName") String newName); }