-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
server/src/main/java/com/yogit/server/report/entity/BoardReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.yogit.server.report.entity; | ||
|
||
import com.yogit.server.board.entity.Board; | ||
import com.yogit.server.report.enums.ReportStatus; | ||
import com.yogit.server.report.enums.ReportType; | ||
import com.yogit.server.user.entity.User; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@DiscriminatorValue("board_report") | ||
@Getter | ||
public class BoardReport extends Report{ | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "board_id") | ||
private Board board; | ||
|
||
@Builder | ||
public BoardReport(String content, User reportingUser, User reportedUser, ReportType reportType, ReportStatus reportStatus, Board board) { | ||
super(content, reportingUser, reportedUser, reportType, reportStatus); | ||
this.board = board; | ||
} | ||
} |