package com.weaver.seconddev.njwebservice.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author liang.cheng
 * @Date 2025/1/6 6:08 PM
 * @Description: 表单字段
 * @Version 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FormDataDuty {

    private Long fieldId;

    private String dataKey;

    /**
     * 字段内容（单行文本、多行文本等）
     */
    private String content;

    private List<DataOptions> dataOptions;

    /**
     * 明细表ID，当传递明细数据且字段传递的dataKey则该值必填
     */
    private Long subFormId;

    /**
     * 明细行序号(主表字段该值不用传递)。1：就代表是明细行第一行。
     */
    private Long dataIndex;

    /**
     * 普通字段类型1
     */
    private int fieldType;

    @Override
    public String toString() {
        return "FormDataDuty{" +
                "fieldId=" + fieldId +
                ", dataKey='" + dataKey + '\'' +
                ", content='" + content + '\'' +
                ", dataOptions=" + dataOptions +
                ", subFormId=" + subFormId +
                ", dataIndex=" + dataIndex +
                '}';
    }
}
