package ${code.packageName}.model.request; import lombok.Data; <#list code.propertys as property> <#if property.type = 'Date'> import java.util.Date; <#break> 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 Edit${code.className}Request { @NotNull private Long id; <#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> /** * ${property.label} */ <#if property.required = '1' && property.type = 'String'> @NotBlank(message="${property.label}不能为空") <#if property.length?? && property.type = 'String'> @Size(max=${property.length},message="${property.label}长度不能超过{max}位") <#if property.required = '1' && property.type != 'String'> @NotNull(message="${property.label}不能为空") <#if property.type = 'Text'> private String ${property.name}; <#elseif property.type= 'bigint'> private Long ${property.name}; <#else> private ${property.type} ${property.name}; }