提交 | 用户 | age
|
9e1c8d
|
1 |
package com.hx.other.service.model; |
G |
2 |
|
|
3 |
import com.fasterxml.jackson.annotation.JsonFormat; |
|
4 |
import com.gitee.sunchenbin.mybatis.actable.annotation.Column; |
|
5 |
import com.gitee.sunchenbin.mybatis.actable.annotation.Index; |
|
6 |
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant; |
|
7 |
import lombok.Data; |
|
8 |
import org.springframework.format.annotation.DateTimeFormat; |
|
9 |
|
|
10 |
import java.io.Serializable; |
|
11 |
import java.util.Date; |
|
12 |
|
|
13 |
/** |
|
14 |
* 基础实体类 |
|
15 |
* @Author: cmg |
|
16 |
* @Data: 2023-04-19 |
|
17 |
*/ |
|
18 |
@Data |
|
19 |
public class BaseEntity implements Serializable { |
|
20 |
|
|
21 |
@Column(type = MySqlTypeConstant.VARCHAR, length = 64, isKey=true, comment="标识", isNull=false) |
|
22 |
private String id; |
|
23 |
|
|
24 |
@Column(comment="是否删除", isNull = false, length = 2, type = MySqlTypeConstant.INT) |
|
25 |
private Integer isDel = NO; |
|
26 |
|
|
27 |
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|
28 |
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|
29 |
@Column(comment="创建时间",type = MySqlTypeConstant.DATETIME, isNull = false) |
|
30 |
private Date createTime = new Date(); |
|
31 |
|
|
32 |
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|
33 |
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|
34 |
@Column(comment="更新时间",type = MySqlTypeConstant.DATETIME) |
|
35 |
private Date editTime = new Date(); |
|
36 |
|
|
37 |
/////////////////////////////////////////////////////// |
|
38 |
/**数字0*/ |
|
39 |
public static final Integer NO = 0; |
|
40 |
/**数字1*/ |
|
41 |
public static final Integer YES = 1; |
|
42 |
} |