From 4689bcb957a6e3e7e017150c281fbb43c2140bc9 Mon Sep 17 00:00:00 2001 From: Cho Sangwook <82208159+Sangwook02@users.noreply.github.com> Date: Sun, 28 Jul 2024 03:42:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=98=88=EC=95=BD=EC=96=B4=20=EB=8C=80?= =?UTF-8?q?=EC=B2=B4=20(#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goldbalance/dive/domain/article/domain/Answer.java | 6 +++--- .../article/domain/{Option.java => OptionType.java} | 2 +- .../com/goldbalance/dive/domain/article/domain/Quiz.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) rename src/main/java/com/goldbalance/dive/domain/article/domain/{Option.java => OptionType.java} (90%) diff --git a/src/main/java/com/goldbalance/dive/domain/article/domain/Answer.java b/src/main/java/com/goldbalance/dive/domain/article/domain/Answer.java index 124df7f..99d07b1 100644 --- a/src/main/java/com/goldbalance/dive/domain/article/domain/Answer.java +++ b/src/main/java/com/goldbalance/dive/domain/article/domain/Answer.java @@ -13,7 +13,7 @@ public class Answer { private Long id; @Enumerated(EnumType.STRING) - private Option option; + private OptionType optionType; private String content; @@ -24,8 +24,8 @@ public class Answer { private Quiz quiz; @Builder(access = AccessLevel.PRIVATE) - private Answer(Option option, String content, boolean correct) { - this.option = option; + private Answer(OptionType optionType, String content, boolean correct) { + this.optionType = optionType; this.content = content; this.correct = correct; } diff --git a/src/main/java/com/goldbalance/dive/domain/article/domain/Option.java b/src/main/java/com/goldbalance/dive/domain/article/domain/OptionType.java similarity index 90% rename from src/main/java/com/goldbalance/dive/domain/article/domain/Option.java rename to src/main/java/com/goldbalance/dive/domain/article/domain/OptionType.java index 5fc3bce..93778c6 100644 --- a/src/main/java/com/goldbalance/dive/domain/article/domain/Option.java +++ b/src/main/java/com/goldbalance/dive/domain/article/domain/OptionType.java @@ -5,7 +5,7 @@ @RequiredArgsConstructor @Getter -public enum Option { +public enum OptionType { ONE("1"), TWO("2"), THREE("3"), diff --git a/src/main/java/com/goldbalance/dive/domain/article/domain/Quiz.java b/src/main/java/com/goldbalance/dive/domain/article/domain/Quiz.java index ee8f05c..03b2366 100644 --- a/src/main/java/com/goldbalance/dive/domain/article/domain/Quiz.java +++ b/src/main/java/com/goldbalance/dive/domain/article/domain/Quiz.java @@ -8,21 +8,21 @@ @RequiredArgsConstructor public class Quiz { @Id - @GeneratedValue + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "quiz_id") private Long id; private String question; - private int order; + private int sequence; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "article_id") private Article article; @Builder(access = AccessLevel.PRIVATE) - private Quiz(String question, int order) { + private Quiz(String question, int sequence) { this.question = question; - this.order = order; + this.sequence = sequence; } }