Skip to content

Commit

Permalink
refactor: 클래스명 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
donghoony committed Aug 11, 2024
1 parent 93aec4d commit 498d28d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Table(name = "checkbox_answer_selected_option")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class CheckBoxAnswerSelectedOptionId {
public class CheckBoxAnswerSelectedOption {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand All @@ -26,7 +26,7 @@ public class CheckBoxAnswerSelectedOptionId {
@Column(name = "selected_option_id", nullable = false)
private long selectedOptionId;

public CheckBoxAnswerSelectedOptionId(long selectedOptionId) {
public CheckBoxAnswerSelectedOption(long selectedOptionId) {
this.selectedOptionId = selectedOptionId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public class CheckboxAnswer {

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "checkbox_answer_id", nullable = false, updatable = false)
private List<CheckBoxAnswerSelectedOptionId> selectedOptionIds;
private List<CheckBoxAnswerSelectedOption> selectedOptionIds;

public CheckboxAnswer(long questionId, List<Long> selectedOptionIds) {
this.questionId = questionId;
this.selectedOptionIds = selectedOptionIds.stream()
.map(CheckBoxAnswerSelectedOptionId::new)
.map(CheckBoxAnswerSelectedOption::new)
.toList();
}
}
4 changes: 2 additions & 2 deletions backend/src/main/java/reviewme/template/domain/Section.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Section {

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "section_id", nullable = false, updatable = false)
private List<SectionQuestionId> questionIds;
private List<SectionQuestion> questionIds;

@Column(name = "on_selected_option_id", nullable = true)
private Long onSelectedOptionId;
Expand All @@ -51,7 +51,7 @@ public Section(VisibleType visibleType, List<Long> questionIds,
Long onSelectedOptionId, String header, int position) {
this.visibleType = visibleType;
this.questionIds = questionIds.stream()
.map(SectionQuestionId::new)
.map(SectionQuestion::new)
.toList();
this.onSelectedOptionId = onSelectedOptionId;
this.header = header;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Table(name = "section_question")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class SectionQuestionId {
public class SectionQuestion {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand All @@ -26,7 +26,7 @@ public class SectionQuestionId {
@Column(name = "question_id", nullable = false)
private long questionId;

public SectionQuestionId(long questionId) {
public SectionQuestion(long questionId) {
this.questionId = questionId;
}
}
4 changes: 2 additions & 2 deletions backend/src/main/java/reviewme/template/domain/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public class Template {

@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval = true)
@JoinColumn(name = "template_id", nullable = false, updatable = false)
private List<TemplateSectionId> sectionIds;
private List<TemplateSection> sectionIds;

public Template(List<Long> sectionIds) {
this.sectionIds = sectionIds.stream()
.map(TemplateSectionId::new)
.map(TemplateSection::new)
.toList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Table(name = "template_section")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class TemplateSectionId {
public class TemplateSection {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand All @@ -26,7 +26,7 @@ public class TemplateSectionId {
@Column(name = "section_id", nullable = false)
private long sectionId;

public TemplateSectionId(long sectionId) {
public TemplateSection(long sectionId) {
this.sectionId = sectionId;
}
}

0 comments on commit 498d28d

Please sign in to comment.