{{#eq apps "link"}}
package {{packageName}}.api.{{apps}}.dto.{{pascalCase appEntities}};

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.ObjectUtils;
import cn.ibizlab.util.domain.*;
import {{packageName}}.api.{{apps}}.dict.*;

/**
 * {{ctrl.appEntity.entity.logicName}}BaseDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "{{ctrl.apiModelName}}BaseDto", description = "{{ctrl.appEntity.entity.logicName}}-{{pascalCase ctrl.codeName}}BaseDto-{{replace ctrl.logicName "表单" ""}}")
public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {

	private static final long serialVersionUID = 1L;

    {{#each ctrl.voItems   }}
    {{#unless hidden}}
    /**
     * {{logicName}}
     */
    {{#if required}}
    {{#eq javaType "String"}}@NotBlank{{else}}@NotNull{{/eq}}(message = "{{logicName}}[{{jsonName}}]不能为空")
    {{/if}}
    @JsonProperty("{{jsonName}}")
            {{#timeType}}
    @JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
    @DateTimeFormat(pattern = "{{format}}")
            {{/timeType}}
            {{#if dict}}
    @JsonFormat(shape = JsonFormat.Shape.{{#if singleSelect}}{{#eq type.java "String"}}STRING{{/eq}}{{#eq type.java "Integer"}}NUMBER{{/eq}}{{else}}STRING{{/if}})
            {{/if}}
    @JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}{{#if serializeUsing}} , serializeUsing = {{serializeUsing}}{{/if}})
            {{#eq javaType "Long"}}
    @JsonSerialize(using = ToStringSerializer.class)
            {{/eq}}
    @ApiModelProperty(value = "{{logicName}}{{columnName}}{{#if userTag}}，{{userTag}}{{/if}}{{#if dict}}，{{#unless singleSelect}}多选{{/unless}}【字典：{{dict.name}}】{{/if}}{{#if timeType}}，格式：{{format}}{{/if}}", position = {{position}}{{#if timeType}}, notes = "格式：{{format}}"{{/if}}{{#if dict}}, notes = "字典：{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{else}}{{#eq editorType 'SPAN'}}, hidden = true{{/eq}}{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
    protected {{javaType}} {{camelCase codeName}};
    {{#if dictList}}
    public void set{{pascalCase codeName}}(String {{camelCase codeName}}) {
        this.{{camelCase codeName}} = {{javaType}}.form({{camelCase codeName}});
    }
    {{/if}}
    {{#if singleFile}}
    public void set{{pascalCase codeName}}(String {{camelCase codeName}}) {
        if({{camelCase codeName}}==null)
            return;
        FileDto fileDto = new FileDto();
        fileDto.setId({{camelCase codeName}});
        {{#if fileExt}}fileDto.setName("{{camelCase codeName}}{{fileExt}}");{{/if}}
        this.{{camelCase codeName}} = fileDto;
    }
    {{/if}}
    {{#if fileList}}
    public void set{{pascalCase codeName}}(String {{camelCase codeName}}) {
        if({{camelCase codeName}}==null)
            return;
        this.{{camelCase codeName}} = JSON.parseObject({{camelCase codeName}},FileListDto.class);
    }
    {{/if}}

    {{/unless}}
    {{/each}}
    {{#if ctrl.sysField.key}}
        {{#or ctrl.sysField.key.hidden ctrl.sysField.key.entity}}
    @JsonProperty("{{ctrl.sysField.key.jsonName}}")
    @JSONField(name = "{{lowerCase ctrl.sysField.key.jsonName}}")
    @ApiModelProperty(value = "{{ctrl.sysField.key.logicName}}", position = {{#if ctrl.sysField.key.position}}{{ctrl.sysField.key.position}}{{else}}9980{{/if}})
    protected {{ctrl.sysField.key.type.java}} {{camelCase ctrl.sysField.key.codeName}};
        {{/or}}

    @ApiModelProperty(value = "系统数据主键", hidden = true)
    protected {{ctrl.sysField.key.type.java}} srfkey;

    public {{ctrl.sysField.key.type.java}} getSrfkey() {
        return this.get{{pascalCase ctrl.sysField.key.codeName}}();
    }

    public void setSrfkey({{ctrl.sysField.key.type.java}} {{camelCase ctrl.sysField.key.codeName}}) {
        this.srfkey = {{camelCase ctrl.sysField.key.codeName}};
        if(!ObjectUtils.isEmpty({{camelCase ctrl.sysField.key.codeName}}))
            this.set{{pascalCase ctrl.sysField.key.codeName}}({{camelCase ctrl.sysField.key.codeName}});
    }

    {{/if}}
    {{#if ctrl.sysField.major}}
        {{#or ctrl.sysField.major.hidden ctrl.sysField.major.entity}}
    @JsonProperty("{{ctrl.sysField.major.jsonName}}")
    @JSONField(name = "{{lowerCase ctrl.sysField.major.jsonName}}")
    @ApiModelProperty(value = "{{ctrl.sysField.major.logicName}}", hidden = true, position = {{#if ctrl.sysField.major.position}}{{ctrl.sysField.major.position}}{{else}}9981{{/if}})
    protected {{ctrl.sysField.major.type.java}} {{camelCase ctrl.sysField.major.codeName}};
        {{/or}}

    @ApiModelProperty(value = "系统数据显示", hidden = true)
    protected {{ctrl.sysField.major.type.java}} srfmajortext;

    public {{ctrl.sysField.major.type.java}} getSrfmajortext() {
        return this.get{{pascalCase ctrl.sysField.major.codeName}}();
    }

    public void setSrfmajortext({{ctrl.sysField.major.type.java}} {{camelCase ctrl.sysField.major.codeName}}) {
        this.srfmajortext = {{camelCase ctrl.sysField.major.codeName}};
        if(!ObjectUtils.isEmpty({{camelCase ctrl.sysField.major.codeName}}))
            this.set{{pascalCase ctrl.sysField.major.codeName}}({{camelCase ctrl.sysField.major.codeName}});
    }

    {{/if}}
    @JsonProperty("srfuf")
    @JSONField(name = "srfuf")
    @ApiModelProperty(value = "系统更新标志", hidden = true)
    protected String srfuf;

}
{{/eq}}