template.domain.ftl Maven / Gradle / Ivy
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import lombok.Data;
/**
*
* ${modelNameUpperCamel}
* ${tableComment}实体
* @author ${author}
*/
@Data
public class ${modelNameUpperCamel} extends BaseEntity{
<#list columns as column>
<#if column.columnName==primaryKey.columnName>
/**
* ${column.columnComment}
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private ${column.attrType} ${column.attrname};
<#elseif column.attrname == "createTime"
|| column.attrname == "createBy"
|| column.attrname == "deleteStatus"
|| column.attrname == "updateTime"
|| column.attrname == "updateBy" >
<#else>
/**
* ${column.columnComment}
*/
@Column(name = "${column.columnName}")
private ${column.attrType} ${column.attrname};
#if>
#list>
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy