| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package nju.seec.helper.entity;
- import lombok.Data;
- import lombok.experimental.Accessors;
- import org.hibernate.annotations.CreationTimestamp;
- import org.hibernate.annotations.DynamicInsert;
- import org.hibernate.annotations.DynamicUpdate;
- import org.hibernate.annotations.UpdateTimestamp;
- import javax.persistence.*;
- import java.time.LocalDateTime;
- /**
- * @author cst
- */
- @Data
- @Accessors(chain = true)
- @Entity
- @Table(name = "notice")
- @DynamicUpdate
- @DynamicInsert
- //@Cacheable
- //@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
- public class Notice {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
- @Column(name = "course_id", nullable = false)
- private Long courseId;
- @Column(name = "teacher_id", nullable = false)
- private Long teacherId;
- @Column(nullable = false)
- private String title;
- @Column(columnDefinition = "text", nullable = false)
- private String content;
- @Column(name = "create_at", nullable = false, updatable = false)
- @CreationTimestamp
- private LocalDateTime createAt;
- @Column(name = "update_at", nullable = false)
- @UpdateTimestamp
- private LocalDateTime updateAt;
- }
|