package incheon.com.menu.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 현재 활성 메뉴 코드를 지정하는 어노테이션
 *
 * 컨트롤러 클래스 또는 메서드에 적용하여 현재 페이지의 메뉴 코드를 명시적으로 지정합니다.
 * 메서드 레벨 어노테이션이 클래스 레벨보다 우선합니다.
 *
 * 사용 예시:
 * <pre>
 * &#64;Controller
 * &#64;MenuCode("MENU010400")
 * public class MenuController {
 *     &#64;GetMapping("/ags/ias/menu/menuList.do")
 *     public String menuList() { ... }  // MENU010400 적용
 *
 *     &#64;GetMapping("/ags/ias/menu/export.do")
 *     &#64;MenuCode("")  // 메뉴 없음
 *     public String export() { ... }
 * }
 * </pre>
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface MenuCode {
    /**
     * 메뉴 코드
     * 빈 문자열("")은 메뉴 활성화하지 않음을 의미
     */
    String value();
}
