package com.yhy.module.core.controller.admin.config.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;

@Schema(description = "管理后台 - 工料机字段设置 创建/更新 Request VO")
@Data
public class ConfigUnitResourceFieldSaveReqVO {

    @Schema(description = "ID（更新时必填）")
    private Long id;

    @Schema(description = "关联 fields_majors 节点ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "catalogItemId 不能为空")
    private Long catalogItemId;

    @Schema(description = "序号")
    private Integer seqNo;

    @Schema(description = "字段名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "字段名称不能为空")
    private String fieldName;

    @Schema(description = "字段编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "字段编码不能为空")
    private String fieldCode;

    @Schema(description = "是否显示")
    private Boolean visible;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "插入位置：above/below/end")
    private String insertPosition;

    @Schema(description = "参考节点ID")
    private Long referenceNodeId;
}
