Skip to content

Commit

Permalink
Merge branch 'feat/#76-book' into feat/#78-evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
f1v3-dev committed Feb 7, 2025
2 parents 78d129c + 925709a commit 5ea0bd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/com/dnd/sbooky/core/Initializer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.dnd.sbooky.core;

import com.dnd.sbooky.core.evaluation.Evaluation;
import com.dnd.sbooky.core.evaluation.EvaluationEntity;
import com.dnd.sbooky.core.evaluation.EvaluationKeyword;
import com.dnd.sbooky.core.evaluation.EvaluationRepository;
import com.dnd.sbooky.core.item.ItemEntity;
Expand Down Expand Up @@ -32,6 +32,6 @@ public void init() {
itemRepository.save(ItemEntity.newInstance(ItemType.CHARACTER, "유령", "basic_ghost"));

Arrays.stream(EvaluationKeyword.values())
.forEach(keyword -> evaluationRepository.save(Evaluation.newInstance(keyword)));
.forEach(keyword -> evaluationRepository.save(EvaluationEntity.newInstance(keyword)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Entity
@Table(name = "evaluation")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Evaluation {
public class EvaluationEntity {

private static final String ENTITY_PREFIX = "evaluation";

Expand All @@ -30,15 +30,15 @@ public class Evaluation {
@Column(name = ENTITY_PREFIX + "_keyword", nullable = false)
private EvaluationKeyword keyword;

private Evaluation(Long id, EvaluationType type, EvaluationKeyword keyword) {
private EvaluationEntity(Long id, EvaluationType type, EvaluationKeyword keyword) {
precondition(id, type, keyword);
this.id = id;
this.type = type;
this.keyword = keyword;
}

public static Evaluation newInstance(EvaluationKeyword keyword) {
return new Evaluation(keyword.getId(), keyword.getType(), keyword);
public static EvaluationEntity newInstance(EvaluationKeyword keyword) {
return new EvaluationEntity(keyword.getId(), keyword.getType(), keyword);
}

private static void precondition(Long id, EvaluationType type, EvaluationKeyword keyword) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

import org.springframework.data.jpa.repository.JpaRepository;

public interface EvaluationRepository extends JpaRepository<Evaluation, Long> {}
public interface EvaluationRepository extends JpaRepository<EvaluationEntity, Long> {}

0 comments on commit 5ea0bd4

Please sign in to comment.