代码生成器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
948 B

package ${packageName}.${moduleName}.param;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
<% for(field in fields) { %>
<% if(field.fieldType == 'LocalDateTime' || field.fieldType == 'LocalDate') { %>
import java.time.${field.fieldType};
<% } %>
<% if(field.fieldType == 'BigDecimal') { %>
import java.math.BigDecimal;
<% } %>
<% } %>
/**
* ${tableComment} 参数对象
*
* @author ${author}
* @since ${date}
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ${className}Param implements Serializable {
private static final long serialVersionUID = 1L;
<% for(field in fields) { %>
/**
* ${field.comment}
*/
<% if(field.isPrimaryKey && field.fieldName != 'id') { %>
@NotNull(message = "${field.comment}不能为空", groups = {UpdateGroup.class})
<% } %>
private ${field.fieldType} ${field.propertyName};
<% } %>
}