|
| 1 | +<#if isWithPackage?exists && isWithPackage==true>package ${packageName}.entity;</#if> |
| 2 | + |
| 3 | +<#if isAutoImport?exists && isAutoImport==true> |
| 4 | +<#if isLombok?exists && isLombok==true>import lombok.Data;</#if> |
| 5 | +import java.util.Date; |
| 6 | +import java.util.List; |
| 7 | +import java.io.Serializable; |
| 8 | +import javax.persistence.*; |
| 9 | +<#if isSwagger?exists && isSwagger==true> |
| 10 | +import io.swagger.annotations.ApiModel; |
| 11 | +import io.swagger.annotations.ApiModelProperty;</#if> |
| 12 | +</#if> |
| 13 | +/** |
| 14 | + * @description ${classInfo.classComment} |
| 15 | + * @author ${authorName} |
| 16 | + * @date ${.now?string('yyyy-MM-dd')} |
| 17 | + */ |
| 18 | +<#if isLombok?exists && isLombok==true>@Data</#if> |
| 19 | +<#if isComment?exists && isComment==true>@Table(name="${classInfo.originTableName}")</#if><#if isSwagger?exists && isSwagger==true> |
| 20 | +@ApiModel("${classInfo.classComment}")</#if> |
| 21 | +public class ${classInfo.className} implements Serializable { |
| 22 | + |
| 23 | + private static final long serialVersionUID = 1L; |
| 24 | + |
| 25 | + @Id |
| 26 | + @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 27 | +<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> |
| 28 | +<#list classInfo.fieldList as fieldItem > |
| 29 | + <#if isComment?exists && isComment==true>/** |
| 30 | + * ${fieldItem.fieldComment} |
| 31 | + */</#if><#if isSwagger?exists && isSwagger==true> |
| 32 | + @ApiModelProperty("${fieldItem.fieldComment}")</#if> |
| 33 | + <#if isComment?exists && isComment==true>@Column(name="${fieldItem.columnName}")</#if> |
| 34 | + private ${fieldItem.fieldClass} ${fieldItem.fieldName}; |
| 35 | + |
| 36 | +</#list> |
| 37 | + public ${classInfo.className}() { |
| 38 | + } |
| 39 | +</#if> |
| 40 | + |
| 41 | +<#if isLombok?exists && isLombok==false> |
| 42 | + public ${fieldItem.fieldClass} get${fieldItem.fieldName?cap_first}() { |
| 43 | + return ${fieldItem.fieldName}; |
| 44 | + } |
| 45 | + |
| 46 | + public void set${fieldItem.fieldName?cap_first}(${fieldItem.fieldClass} ${fieldItem.fieldName}) { |
| 47 | + this.${fieldItem.fieldName} = ${fieldItem.fieldName}; |
| 48 | + } |
| 49 | +</#if> |
| 50 | +} |
0 commit comments