timemail-code-generator/src/main/resources/template/entity.ftl

40 lines
781 B
Plaintext
Raw Normal View History

2023-01-13 18:51:08 +08:00
package ${packages}.${configuration.packageLocation.entity};
2021-04-19 00:06:24 +08:00
2021-04-19 22:09:25 +08:00
import lombok.AllArgsConstructor;
import lombok.Builder;
2021-04-19 00:06:24 +08:00
import lombok.Data;
2021-04-19 22:09:25 +08:00
import lombok.NoArgsConstructor;
2021-04-19 00:06:24 +08:00
import java.io.Serializable;
2023-01-13 18:51:08 +08:00
<#if hasBigDecimal>
import java.math.BigDecimal;
</#if>
<#if hasLocalDate>
import java.time.LocalDate;
</#if>
<#if hasLocalTime>
import java.time.LocalTime;
</#if>
<#if hasLocalDateTime>
import java.time.LocalDateTime;
</#if>
2021-04-19 00:06:24 +08:00
/**
2023-01-13 18:51:08 +08:00
* ${tableName}
2021-04-19 22:09:25 +08:00
* entity
2023-01-13 18:51:08 +08:00
* @author ${configuration.author}
2021-04-19 00:06:24 +08:00
* @date ${.now?datetime}
*/
@Data
2021-04-19 22:09:25 +08:00
@AllArgsConstructor
@NoArgsConstructor
@Builder
2023-01-13 18:51:08 +08:00
public class ${className} implements Serializable {
2021-04-19 00:06:24 +08:00
<#list columns as column>
/**
2023-01-07 17:38:05 +08:00
* ${column.remarks!'// Todo Add comments'}
2021-04-19 00:06:24 +08:00
*/
2021-04-19 22:09:25 +08:00
private ${column.javaType} ${column.columnName};
2021-04-19 00:06:24 +08:00
</#list>
}