package ${code.packageName}.model.request;

<#list code.propertys as property>
<#if property.type = 'Date'>
import java.util.Date;
<#break>
</#if>
</#list>
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
* @author ${code.author}
* @date  ${.now?string('yyyy-MM-dd')}
*/
@Data
public class Add${code.className}Request {

<#list code.propertys as property>

    <#if property.name = 'create_user_id' || property.name= 'create_user_name' || property.name= 'create_time' || property.name= 'update_user_id' || property.name= 'update_user_name' || property.name= 'update_time' || property.name= 'delete_flag' || property.name= 'version'>
        <#continue>
    </#if>
    /**
    *${property.label}
    */
    <#if property.required = '1' && property.type = 'String'>
    @NotBlank(message="${property.label}不能为空")
    </#if>
    <#if property.length?? && property.type = 'String'>
    @Size(max=${property.length},message="${property.label}长度不能超过{max}位")
    </#if>
    <#if property.required = '1' && property.type != 'String'>
    @NotNull(message="${property.label}不能为空")
    </#if>
    <#if property.type = 'Text'>
    private String ${property.name};
    <#elseif property.type= 'bigint'>
    private Long ${property.name};
    <#else>
    private ${property.type} ${property.name};
    </#if>
</#list>

}
