All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.generator.Entity.vm Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package ${package}.${moduleName}.entity;

import com.github.hdy.jdbcplus.data.annotation.Entity;
import com.github.hdy.jdbcplus.data.annotation.Id;
import javax.validation.constraints.NotBlank;
import lombok.Data;
#if(${hasBigDecimal})
import java.math.BigDecimal;
#end
#if(${hasDate})
import java.util.Date;
#end

/**
 * ${comments}
 *
 * @author ${author}
 * @date ${datetime}
 */
@Data
@Entity(name = "${tableName}")
public class ${className} {

#foreach ($column in $columns)
/**
 * $column.comments
 */
    #if($column.columnName == $pk.columnName)
    @Id#if($column.extra == 'auto_increment')(automatic = true)
    #end
    #end
    #if($column.isNullBle == "NO")
    @NotBlank(message = "$column.comments不能为空")
    #end
private $column.attrType $column.lowerAttrName;
#end

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy