Reply.java 754 B

1234567891011121314151617181920212223242526272829303132333435
  1. package nju.seec.helper.entity;
  2. import lombok.Data;
  3. import lombok.experimental.Accessors;
  4. import org.hibernate.annotations.CreationTimestamp;
  5. import javax.persistence.*;
  6. import java.time.LocalDateTime;
  7. /**
  8. * @author cst
  9. */
  10. @Data
  11. @Accessors(chain = true)
  12. @Entity
  13. @Table(name = "reply")
  14. public class Reply {
  15. @Id
  16. @GeneratedValue(strategy = GenerationType.IDENTITY)
  17. private Integer id;
  18. @ManyToOne
  19. @JoinColumn(name = "comment_id", nullable = false)
  20. private Comment comment;
  21. @Column(name = "teacher_id", nullable = false)
  22. private Integer teacherId;
  23. @Column(nullable = false)
  24. private String content;
  25. @Column(name = "create_at", updatable = false)
  26. @CreationTimestamp
  27. private LocalDateTime createAt;
  28. }