File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
back/src/main/java/com/back/domain Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 33import com .back .domain .comment .entity .Comment ;
44import com .back .domain .poll .entity .PollVote ;
55import com .back .domain .post .enums .PostCategory ;
6+ import com .back .domain .scenario .entity .Scenario ;
67import com .back .domain .user .entity .User ;
78import com .back .global .baseentity .BaseEntity ;
89import com .back .global .exception .ApiException ;
@@ -69,6 +70,10 @@ public class Post extends BaseEntity {
6970 @ Builder .Default
7071 private List <PollVote > pollVotes = new ArrayList <>();
7172
73+ @ OneToOne (fetch = FetchType .LAZY )
74+ @ JoinColumn (name = "scenario_id" )
75+ private Scenario scenario ;
76+
7277 public void updatePost (String title , String content , PostCategory category ) {
7378 this .title = title ;
7479 this .content = content ;
Original file line number Diff line number Diff line change @@ -52,11 +52,6 @@ public class Scenario extends BaseEntity {
5252 @ LastModifiedDate
5353 private LocalDateTime updatedDate ;
5454
55- // 시나리오와 연결된 게시글 (시나리오 공유 시 생성)
56- @ ManyToOne (fetch = FetchType .LAZY )
57- @ JoinColumn (name = "post_id" , unique = true )
58- private Post post ;
59-
6055 // AI가 생성한 직업 정보
6156 @ Column (length = 200 )
6257 private String job ;
You can’t perform that action at this time.
0 commit comments