package com.cm.common.plugin.pojo.dtos.dynamic;

import com.cm.common.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: DynamicFormListShowFieldDTO
 * @Description: 动态表单列表显示字段
 * @Author: WangGeng
 * @Date: 2019/12/5 18:35
 * @Version: 1.0
 **/
@ApiModel
public class DynamicFormFormShowFieldDTO {

    @ApiModelProperty(name = "fieldName", value = "字段名称")
    @CheckEmptyAnnotation(name = "字段名称")
    private String fieldName;
    @ApiModelProperty(name = "fieldExplain", value = "字段说明")
    @CheckEmptyAnnotation(name = "字段说明")
    private String fieldExplain;
    @ApiModelProperty(name = "fieldType", value = "字段类型")
    private String fieldType;
    @ApiModelProperty(name = "fieldDefault", value = "字段默认值")
    private String fieldDefault;
    @ApiModelProperty(name = "dictionaryId", value = "字典ID")
    private String dictionaryId;
    @ApiModelProperty(name = "verifyType", value = "校验类型")
    private String verifyType;
    @ApiModelProperty(name = "verifyRegular", value = "校验正则")
    private String verifyRegular;
    @ApiModelProperty(name = "joinTable", value = "联表表名")
    private String joinTable;
    @ApiModelProperty(name = "joinTableField", value = "联表字段")
    private String joinTableField;
    @ApiModelProperty(name = "joinTableFormShow", value = "联表显示字段")
    private String joinTableFormShow;

    public String getFieldName() {
        return fieldName == null ? "" : fieldName.trim();
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getFieldExplain() {
        return fieldExplain == null ? "" : fieldExplain.trim();
    }

    public void setFieldExplain(String fieldExplain) {
        this.fieldExplain = fieldExplain;
    }

    public String getFieldType() {
        return fieldType == null ? "" : fieldType.trim();
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public String getFieldDefault() {
        return fieldDefault == null ? "" : fieldDefault.trim();
    }

    public void setFieldDefault(String fieldDefault) {
        this.fieldDefault = fieldDefault;
    }

    public String getDictionaryId() {
        return dictionaryId == null ? "" : dictionaryId.trim();
    }

    public void setDictionaryId(String dictionaryId) {
        this.dictionaryId = dictionaryId;
    }

    public String getVerifyType() {
        return verifyType == null ? "" : verifyType.trim();
    }

    public void setVerifyType(String verifyType) {
        this.verifyType = verifyType;
    }

    public String getVerifyRegular() {
        return verifyRegular == null ? "" : verifyRegular.trim();
    }

    public void setVerifyRegular(String verifyRegular) {
        this.verifyRegular = verifyRegular;
    }

    public String getJoinTable() {
        return joinTable == null ? "" : joinTable.trim();
    }

    public void setJoinTable(String joinTable) {
        this.joinTable = joinTable;
    }

    public String getJoinTableField() {
        return joinTableField == null ? "" : joinTableField.trim();
    }

    public void setJoinTableField(String joinTableField) {
        this.joinTableField = joinTableField;
    }

    public String getJoinTableFormShow() {
        return joinTableFormShow == null ? "" : joinTableFormShow.trim();
    }

    public void setJoinTableFormShow(String joinTableFormShow) {
        this.joinTableFormShow = joinTableFormShow;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"fieldName\":")
                .append("\"").append(fieldName).append("\"");
        sb.append(",\"fieldExplain\":")
                .append("\"").append(fieldExplain).append("\"");
        sb.append(",\"fieldType\":")
                .append("\"").append(fieldType).append("\"");
        sb.append(",\"fieldDefault\":")
                .append("\"").append(fieldDefault).append("\"");
        sb.append(",\"dictionaryId\":")
                .append("\"").append(dictionaryId).append("\"");
        sb.append(",\"verifyType\":")
                .append("\"").append(verifyType).append("\"");
        sb.append(",\"verifyRegular\":")
                .append("\"").append(verifyRegular).append("\"");
        sb.append(",\"joinTable\":")
                .append("\"").append(joinTable).append("\"");
        sb.append(",\"joinTableField\":")
                .append("\"").append(joinTableField).append("\"");
        sb.append(",\"joinTableFormShow\":")
                .append("\"").append(joinTableFormShow).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
