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

template.entity.vm Maven / Gradle / Ivy

There is a newer version: 1.0.20
Show newest version
package ${packageName}.${modularName}.${busName}.entity;

import com.baomidou.mybatisplus.annotation.*;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.*;
#foreach ($column in $tableField)
#if (${column.javaType} == 'BigDecimal')
import java.math.BigDecimal;
#end
#if(${column.javaType} == "Date")
import cn.afterturn.easypoi.excel.annotation.Excel;
#end
#end

/**
 * ${functionName}
 *
 * @author ${authorName}
 * @date ${createDateString}
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("${tableName}")
public class ${ClassName} extends BaseEntity {

#foreach ($column in $tableField)
#if (${column.columnKey} == "PRI")
    /**
     * ${column.columnComment}
     */
    @TableId(type = IdType.ASSIGN_ID)
    private ${column.javaType} ${column.javaName};
#elseif (${column.whetherCommon} == 'N')

    /**
     * ${column.columnComment}
     */
#if(${column.javaType} == "Date")
    @Excel(name = "${column.columnComment}", databaseFormat = "yyyy-MM-dd HH:mm:ss", format = "yyyy-MM-dd", width = 20)
#end
    private ${column.javaType} ${column.javaName};
#end
#end

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy