package gc.mda.kcg.permission.annotation;

import java.lang.annotation.*;

/**
 * 메서드/클래스 레벨 권한 요구 어노테이션.
 *
 * 사용 예:
 * <pre>
 * @RequirePermission(resource = "parent-inference-workflow:parent-review", operation = "UPDATE")
 * @PostMapping("/groups/{key}/parent-inference/{sub}/review")
 * public ResponseEntity<?> review(...) { ... }
 * </pre>
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RequirePermission {
    /** 리소스 코드 (예: "detection:gear-detection") */
    String resource();

    /** 오퍼레이션 (READ/CREATE/UPDATE/DELETE/EXPORT). 기본 READ */
    String operation() default "READ";
}
