package ${basePackage}.pojo.dtos.${lowerTableName};

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 *
 * @ClassName: ${firstUpperTableName}DTO
 * @Description: ${tableExplain}
 * @Author: ${author}
 * @Date: ${date}
 * @Version: ${version}
 **/
@ApiModel
public class ${firstUpperTableName}DTO {

    @ApiModelProperty(name = "${firstLowerTableName}Id", value = "主键")
    private String ${firstLowerTableName}Id;
    <#list fieldList! as field>
        <#if field.fieldType == "number">
    @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}")
    private Integer ${field.fieldName};
        <#elseif field.fieldType == "double">
    @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}")
    private Double ${field.fieldName};
        <#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
    @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}")
    private String ${field.fieldName};
    @ApiModelProperty(name = "${field.fieldName}DictionaryName", value = "${field.fieldExplain}字典名称")
    private String ${field.fieldName}DictionaryName;
        <#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
    @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}")
    private String ${field.fieldName};
            <#list field.listJoinTableField! as joinTableField>
                <#if joinTableField.listShow == 1>
    @ApiModelProperty(name = "${field.joinTable}${joinTableField.firstUpperFieldName}", value = "${joinTableField.fieldExplain}")
    private String ${field.joinTable}${joinTableField.firstUpperFieldName};
                </#if>
            </#list>
        <#else>
    @ApiModelProperty(name = "${field.fieldName}", value = "${field.fieldExplain}")
    private String ${field.fieldName};
        </#if>
    </#list>

    public String get${firstUpperTableName}Id() {
        return ${firstLowerTableName}Id == null ? "" : ${firstLowerTableName}Id.trim();
    }

    public void set${firstUpperTableName}Id(String ${firstLowerTableName}Id) {
        this.${firstLowerTableName}Id = ${firstLowerTableName}Id;
    }

    <#list fieldList! as field>
        <#if field.fieldType == "number">
    public Integer get${field.firstUpperFieldName}() {
        return ${field.fieldName} == null ? 0 : ${field.fieldName};
    }

    public void set${field.firstUpperFieldName}(Integer ${field.fieldName}) {
        this.${field.fieldName} = ${field.fieldName};
    }

        <#elseif field.fieldType == "double">
    public Double get${field.firstUpperFieldName}() {
        return ${field.fieldName} == null ? 0D : ${field.fieldName};
    }

    public void set${field.firstUpperFieldName}(Double ${field.fieldName}) {
        this.${field.fieldName} = ${field.fieldName};
    }

        <#elseif field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
    public String get${field.firstUpperFieldName}() {
        return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
    }

    public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
        this.${field.fieldName} = ${field.fieldName};
    }

    public String get${field.firstUpperFieldName}DictionaryName() {
        return ${field.fieldName}DictionaryName == null ? "" : ${field.fieldName}DictionaryName.trim();
    }

    public void set${field.firstUpperFieldName}DictionaryName(String ${field.fieldName}DictionaryName) {
        this.${field.fieldName}DictionaryName = ${field.fieldName}DictionaryName;
    }
        <#elseif field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
    public String get${field.firstUpperFieldName}() {
        return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
    }

    public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
        this.${field.fieldName} = ${field.fieldName};
    }

            <#list field.listJoinTableField! as joinTableField>
                <#if joinTableField.listShow == 1>
    public String get${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}() {
        return ${field.joinTable}${joinTableField.firstUpperFieldName} == null ? "" : ${field.joinTable}${joinTableField.firstUpperFieldName}.trim();
    }

    public void set${field.firstUpperJoinTable}${joinTableField.firstUpperFieldName}(String ${field.joinTable}${joinTableField.firstUpperFieldName}) {
        this.${field.joinTable}${joinTableField.firstUpperFieldName} = ${field.joinTable}${joinTableField.firstUpperFieldName};
    }

                </#if>
            </#list>
        <#else>
    public String get${field.firstUpperFieldName}() {
        return ${field.fieldName} == null ? "" : ${field.fieldName}.trim();
    }

    public void set${field.firstUpperFieldName}(String ${field.fieldName}) {
        this.${field.fieldName} = ${field.fieldName};
    }

        </#if>
    </#list>

}
