码迷,mamicode.com
首页 > 其他好文 > 详细

BaseEntity

时间:2019-04-26 13:18:52      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:amp   generic   mes   json   timezone   idg   time()   name   void   

@MappedSuperclass
public class BaseEntity {
@Id
@GenericGenerator(name="idGenerator", strategy="uuid")
@GeneratedValue(generator="idGenerator")
// @Column(name = "id")
private String objid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "creation_time",updatable = false)
@CreationTimestamp
// @Generated(GenerationTime.INSERT)
private Date creationTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "modify_time")
@UpdateTimestamp
// @Generated(GenerationTime.ALWAYS)
private Date modifyTime;

public String getObjid() {
return objid;
}

public void setObjid(String objid) {
this.objid = objid;
}

public Date getCreationTime() {
return creationTime;
}

public void setCreationTime(Date creationTime) {
this.creationTime = creationTime;
}

public Date getModifyTime() {
return modifyTime;
}

public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
}

BaseEntity

标签:amp   generic   mes   json   timezone   idg   time()   name   void   

原文地址:https://www.cnblogs.com/lxxyd/p/10773499.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!