package com.fizz.business.form;

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * OPC 写数据请求表单
 */
@Data
@Schema(description = "OPC 写数据请求")
public class OpcWriteDataForm implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 字段名（对象属性名），例如：coilId
     * 系统会自动查找对应的 OPC 节点路径
     */
    @Schema(description = "字段名（对象属性名）", example = "coilId")
    @NotBlank(message = "字段名不能为空")
    private String fieldName;

    /**
     * 要写入的值（支持多种类型：String, Integer, Double, Boolean 等）
     */
    @Schema(description = "要写入的值", example = "COIL001")
    @NotNull(message = "写入值不能为空")
    private Object value;
}

