package ink.wgink.module.activiti.pojo.vos.oa.nodemanage;

import ink.wgink.module.activiti.pojo.vos.oa.nodemanage.config.AssigneeVO;
import ink.wgink.module.activiti.pojo.vos.oa.nodemanage.config.NodeFormButtonVO;
import ink.wgink.module.activiti.pojo.vos.oa.nodemanage.config.NodeFormFieldVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * @ClassName: ConfigVO
 * @Description: 配置
 * @Author: wanggeng
 * @Date: 2022/4/4 11:06
 * @Version: 1.0
 */
@ApiModel
public class ConfigVO {

    @ApiModelProperty(name = "formId", value = "表单ID")
    private String formId;
    @ApiModelProperty(name = "assignee", value = "代理人")
    private AssigneeVO assignee;
    @ApiModelProperty(name = "formFields", value = "表单字段列表")
    private List<NodeFormFieldVO> formFields;
    @ApiModelProperty(name = "formButton", value = "表单按钮")
    private NodeFormButtonVO formButton;

    public String getFormId() {
        return formId == null ? "" : formId.trim();
    }

    public void setFormId(String formId) {
        this.formId = formId;
    }

    public AssigneeVO getAssignee() {
        return assignee;
    }

    public void setAssignee(AssigneeVO assignee) {
        this.assignee = assignee;
    }

    public List<NodeFormFieldVO> getFormFields() {
        return formFields;
    }

    public void setFormFields(List<NodeFormFieldVO> formFields) {
        this.formFields = formFields;
    }

    public NodeFormButtonVO getFormButton() {
        return formButton;
    }

    public void setFormButton(NodeFormButtonVO formButton) {
        this.formButton = formButton;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"formId\":\"")
                .append(formId).append('\"');
        sb.append(",\"assignee\":")
                .append(assignee);
        sb.append(",\"formFields\":")
                .append(formFields);
        sb.append(",\"formButton\":")
                .append(formButton);
        sb.append('}');
        return sb.toString();
    }
}
