b022223122ce54f03bc01ec1a4a5a7780dba9975.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package ${bussiPackage}.entity.${entityPackage};
  2. import java.io.Serializable;
  3. import com.baomidou.mybatisplus.annotation.IdType;
  4. import com.baomidou.mybatisplus.annotation.TableId;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import lombok.Data;
  7. import java.util.Date;
  8. import com.fasterxml.jackson.annotation.JsonFormat;
  9. import org.springframework.format.annotation.DateTimeFormat;
  10. import org.jeecgframework.poi.excel.annotation.Excel;
  11. import io.swagger.annotations.ApiModel;
  12. import io.swagger.annotations.ApiModelProperty;
  13. /**
  14. * @Description: ${tableVo.ftlDescription}
  15. * @Author: jeecg-boot
  16. * @Date: ${.now?string["yyyy-MM-dd"]}
  17. * @Version: V1.0
  18. */
  19. @Data
  20. @TableName("${tableName}")
  21. @ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
  22. public class ${entityName} implements Serializable {
  23. private static final long serialVersionUID = 1L;
  24. <#list originalColumns as po>
  25. /**${po.filedComment}*/
  26. <#if po.fieldName == primaryKeyField>
  27. @TableId(type = IdType.ASSIGN_ID)
  28. <#else>
  29. <#if po.fieldType =='java.util.Date'>
  30. <#if po.fieldDbType =='date'>
  31. @Excel(name = "${po.filedComment}", width = 15, format = "yyyy-MM-dd")
  32. @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
  33. @DateTimeFormat(pattern="yyyy-MM-dd")
  34. <#elseif po.fieldDbType =='datetime'>
  35. @Excel(name = "${po.filedComment}", width = 20, format = "yyyy-MM-dd HH:mm:ss")
  36. @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
  37. @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
  38. </#if>
  39. <#else>
  40. @Excel(name = "${po.filedComment}", width = 15)
  41. </#if>
  42. </#if>
  43. @ApiModelProperty(value = "${po.filedComment}")
  44. private <#if po.fieldType=='java.sql.Blob'>byte[]<#else>${po.fieldType}</#if> ${po.fieldName};
  45. </#list>
  46. }