|
1 | 1 | package com.example.log4u.domain.reports.entity; |
2 | 2 |
|
3 | | -import java.time.LocalDateTime; |
4 | | - |
5 | | -import org.springframework.data.annotation.CreatedDate; |
6 | | -import org.springframework.data.jpa.domain.support.AuditingEntityListener; |
7 | | - |
| 3 | +import com.example.log4u.common.entity.BaseEntity; |
8 | 4 | import com.example.log4u.domain.reports.reportTargetType.ReportTargetType; |
9 | 5 | import com.example.log4u.domain.reports.reportType.ReportType; |
10 | 6 |
|
| 7 | +import jakarta.persistence.Column; |
11 | 8 | import jakarta.persistence.Entity; |
12 | | -import jakarta.persistence.EntityListeners; |
13 | 9 | import jakarta.persistence.EnumType; |
14 | 10 | import jakarta.persistence.Enumerated; |
15 | 11 | import jakarta.persistence.GeneratedValue; |
|
27 | 23 | @AllArgsConstructor(access = AccessLevel.PACKAGE) |
28 | 24 |
|
29 | 25 | @Entity |
30 | | -@EntityListeners(AuditingEntityListener.class) |
31 | | -public class Report { |
| 26 | +public class Report extends BaseEntity { |
32 | 27 | @Id |
33 | 28 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
34 | 29 | private Long id; |
35 | 30 |
|
| 31 | + @Column(nullable = false) |
36 | 32 | private Long reporterId; |
37 | 33 |
|
| 34 | + @Column(nullable = false) |
38 | 35 | @Enumerated(EnumType.STRING) |
39 | 36 | private ReportTargetType reportTargetType; |
40 | 37 |
|
| 38 | + @Column(nullable = false) |
41 | 39 | @Enumerated(EnumType.STRING) |
42 | 40 | private ReportType reportType; |
43 | 41 |
|
| 42 | + @Column(nullable = false) |
44 | 43 | private Long reportTargetId; |
45 | 44 |
|
| 45 | + @Column(nullable = false) |
46 | 46 | private String content; |
47 | | - |
48 | | - @CreatedDate |
49 | | - private LocalDateTime createdAt; |
50 | 47 | } |
0 commit comments