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

template.jpa.Entity.ftl Maven / Gradle / Ivy

There is a newer version: 1.1.10-2024
Show newest version
package ${jpaEntityPackage};

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import lombok.EqualsAndHashCode;
import lombok.Data;
import javax.persistence.*;

/**
* description: ${table.srcName} ${table.comment} 实体类
*/
@Data
@Entity
@Table(name = "${table.srcName}")
public class ${table.name}   implements Serializable {


/**
* 序列化参数
*/
private static final long serialVersionUID = 1L;

<#list table.fields as column>
    /**
    * ${column.columnSrcName} ${column.columnComment}
    */
    <#if column.primaryKey>
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Id
        @Column(name = "${column.columnSrcName}")
    <#else>
        @Column(name = "${column.columnSrcName}")
    
    private ${column.columnType} ${column.columnName};


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy