Skip to content

Commit

Permalink
fix: 예약어 대체 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 authored Jul 27, 2024
1 parent 6cd275d commit 4689bcb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Answer {
private Long id;

@Enumerated(EnumType.STRING)
private Option option;
private OptionType optionType;

private String content;

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@RequiredArgsConstructor
@Getter
public enum Option {
public enum OptionType {
ONE("1"),
TWO("2"),
THREE("3"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 4689bcb

Please sign in to comment.