You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
package {{ package.Entity }};
|
|
import {{ package.Entity }}.BaseEntity;
|
|
|
|
//--- import 固定引入 ---//
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
import io.swagger.annotations.ApiModel;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import java.io.Serializable;
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
* {{ table.comment }}
|
|
*
|
|
* @Author: {{author}}
|
|
* @Date: {{date}}
|
|
* @Wechat: {{ wechat }}
|
|
*/
|
|
|
|
{% if entityLombokModel %}
|
|
@Data
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@TableName("{{ table.name }}")
|
|
@ApiModel(value = "{{ table.name }}对象", description = "{{ table.comment }}"){% endif %}
|
|
public class {{ table.entity }} extends BaseEntity {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
{% for field in fields %}
|
|
{% if field.java_type == 'Date' and field.tab_type == 'date' %}@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8"){% endif %}
|
|
{% if field.java_type == 'Date' and field.tab_type == 'datetime' %}@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8"){% endif %}
|
|
@TableField("{{ field.tab_name }}")
|
|
@ApiModelProperty("{{ field.comment }}")
|
|
private {{ field.java_type }} {{ field.java_name }};
|
|
{% endfor %}
|
|
|
|
|
|
}
|
|
|