Skip to content

Commit

Permalink
chore - entity update
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJeongGi committed Mar 18, 2024
1 parent 4f45a1a commit 132f3c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.benchmarker.common.model.BaseTime;
import org.benchmarker.template.controller.dto.TestResultResponseDto;

import java.util.List;

@Slf4j
@Getter
@Setter
Expand Down Expand Up @@ -33,6 +35,15 @@ public class TestResult extends BaseTime {

private Double mttbfbAvg;

@OneToMany(mappedBy = "testResult", fetch = FetchType.EAGER)
private List<TestMttfb> testMttfbs;

@OneToMany(mappedBy = "testResult", fetch = FetchType.EAGER)
private List<TestTps> testTps;

@OneToMany(mappedBy = "testResult", fetch = FetchType.EAGER)
private List<TestStatus> testStatuses;

public TestResultResponseDto convertToResponseDto() {
return TestResultResponseDto.builder()
.testId(this.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.benchmarker.template.controller.dto.TestTemplateUpdateDto;
import org.benchmarker.user.model.UserGroup;

import java.util.List;

@Slf4j
@Setter
@Getter
Expand Down Expand Up @@ -43,6 +45,8 @@ public class TestTemplate extends BaseTime {
@Column(nullable = false)
private Integer cpuLimit;

@OneToMany(mappedBy = "testTemplate", fetch = FetchType.EAGER)
private List<TestResult> testResults;

public void update(TestTemplateUpdateDto testTemplate) {

Expand Down

0 comments on commit 132f3c9

Please sign in to comment.