BaseEntity


@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;
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM