12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- package ${code.packageName}.model.request;
- import lombok.Data;
- <#list code.propertys as property>
- <#if property.type = 'Date'>
- import java.util.Date;
- <#break>
- </#if>
- </#list>
- 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>
- </#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>
- }
|