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

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 DynamicFormListShowFieldDTO {

    @ApiModelProperty(name = "fieldName", value = "字段名称")
    private String fieldName;
    @ApiModelProperty(name = "fieldExplain", value = "字段说明")
    private String fieldExplain;
    @ApiModelProperty(name = "fieldType", value = "字段类型")
    private String fieldType;
    @ApiModelProperty(name = "fieldWidth", value = "字段宽度")
    private Integer fieldWidth;

    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 Integer getFieldWidth() {
        return fieldWidth;
    }

    public void setFieldWidth(Integer fieldWidth) {
        this.fieldWidth = fieldWidth;
    }

    @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(",\"fieldWidth\":")
                .append(fieldWidth);
        sb.append('}');
        return sb.toString();
    }
}
