package com.lingyue.graph.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 更新节点引用请求
 * 
 * @author lingyue
 * @since 2026-01-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "更新节点引用请求")
public class UpdateRefsRequest {
    
    @Schema(description = "更新模式", example = "replace/append/remove")
    private String mode = "replace";
    
    @Schema(description = "节点引用列表")
    private List<NodeRef> refs;
    
    /**
     * 替换模式 - 完全替换现有引用
     */
    public static final String MODE_REPLACE = "replace";
    
    /**
     * 追加模式 - 追加到现有引用
     */
    public static final String MODE_APPEND = "append";
    
    /**
     * 移除模式 - 从现有引用中移除
     */
    public static final String MODE_REMOVE = "remove";
    
    public boolean isReplace() {
        return MODE_REPLACE.equals(mode);
    }
    
    public boolean isAppend() {
        return MODE_APPEND.equals(mode);
    }
    
    public boolean isRemove() {
        return MODE_REMOVE.equals(mode);
    }
}
