敏捷工具
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.

31 lines
683 B

2 years ago
  1. package com.whn.hellospring.model;
  2. import lombok.AllArgsConstructor;
  3. import lombok.Data;
  4. import lombok.NoArgsConstructor;
  5. import org.hibernate.annotations.CreationTimestamp;
  6. import org.hibernate.annotations.Sort;
  7. import org.hibernate.annotations.UpdateTimestamp;
  8. import javax.persistence.*;
  9. import java.io.Serializable;
  10. import java.util.Date;
  11. @MappedSuperclass
  12. @Data
  13. @NoArgsConstructor
  14. @AllArgsConstructor
  15. public class BaseEntity implements Serializable {
  16. @Id
  17. @GeneratedValue(strategy = GenerationType.IDENTITY)
  18. private Long id;
  19. @Column(updatable = false)
  20. @CreationTimestamp
  21. private Date createTime;
  22. @UpdateTimestamp
  23. private Date updateTime;
  24. }