File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
back/src/main/java/com/back/domain/node/entity Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 11package com .back .domain .node .entity ;
22
3+ import com .back .domain .scenario .entity .Scenario ;
34import com .back .domain .user .entity .User ;
45import com .back .global .baseentity .BaseEntity ;
56import jakarta .persistence .*;
@@ -35,6 +36,10 @@ public class BaseLine extends BaseEntity {
3536 @ Builder .Default
3637 private List <BaseNode > baseNodes = new ArrayList <>();
3738
39+ @ OneToMany (mappedBy = "baseLine" , cascade = CascadeType .ALL , orphanRemoval = true )
40+ @ Builder .Default
41+ private List <Scenario > scenarios = new ArrayList <>();
42+
3843 //중간 피벗 나이 목록 반환(헤더/꼬리 제외, 중복 제거, 오름차순)
3944 public List <Integer > pivotAges () {
4045 List <BaseNode > nodes = this .baseNodes ;
Original file line number Diff line number Diff line change 44 */
55package com .back .domain .node .entity ;
66
7+ import com .back .domain .scenario .entity .Scenario ;
78import com .back .domain .user .entity .User ;
89import com .back .global .baseentity .BaseEntity ;
910import jakarta .persistence .*;
@@ -49,6 +50,10 @@ public class DecisionLine extends BaseEntity {
4950 @ JoinColumn (name = "pinned_commit_id" )
5051 private BaselineCommit pinnedCommit ;
5152
53+ @ OneToOne (fetch = FetchType .LAZY )
54+ @ JoinColumn (name = "scenario_id" )
55+ private Scenario scenario ;
56+
5257 // 라인 취소 상태 전이
5358 public void cancel () {
5459 if (this .status == DecisionLineStatus .COMPLETED ) {
You can’t perform that action at this time.
0 commit comments