diff --git a/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/HistoryTestData.java b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/HistoryTestData.java
new file mode 100644
index 000000000..e18fb7d34
--- /dev/null
+++ b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/HistoryTestData.java
@@ -0,0 +1,67 @@
+package app.bottlenote.common.fixture;
+
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.history.constant.EventCategory;
+import app.bottlenote.history.constant.EventType;
+import app.bottlenote.history.domain.UserHistory;
+import app.bottlenote.user.domain.User;
+import java.util.List;
+
+/**
+ * 히스토리 테스트용 복합 데이터 record
+ *
+ *
기존 init-user-history.sql 대체용
+ */
+public record HistoryTestData(
+ List users, List alcohols, List histories) {
+
+ /**
+ * 특정 인덱스의 사용자 반환
+ *
+ * @param index 0-based index
+ * @return User 객체
+ */
+ public User getUser(int index) {
+ return users.get(index);
+ }
+
+ /**
+ * 특정 인덱스의 알코올 반환
+ *
+ * @param index 0-based index
+ * @return Alcohol 객체
+ */
+ public Alcohol getAlcohol(int index) {
+ return alcohols.get(index);
+ }
+
+ /**
+ * 특정 사용자의 히스토리 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자의 히스토리 목록
+ */
+ public List getHistoriesByUser(Long userId) {
+ return histories.stream().filter(h -> h.getUserId().equals(userId)).toList();
+ }
+
+ /**
+ * 특정 이벤트 카테고리의 히스토리 목록 반환
+ *
+ * @param category 이벤트 카테고리
+ * @return 해당 카테고리의 히스토리 목록
+ */
+ public List getHistoriesByCategory(EventCategory category) {
+ return histories.stream().filter(h -> h.getEventCategory() == category).toList();
+ }
+
+ /**
+ * 특정 이벤트 타입의 히스토리 목록 반환
+ *
+ * @param eventType 이벤트 타입
+ * @return 해당 타입의 히스토리 목록
+ */
+ public List getHistoriesByEventType(EventType eventType) {
+ return histories.stream().filter(h -> h.getEventType() == eventType).toList();
+ }
+}
diff --git a/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyBottleTestData.java b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyBottleTestData.java
new file mode 100644
index 000000000..78ba8a876
--- /dev/null
+++ b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyBottleTestData.java
@@ -0,0 +1,71 @@
+package app.bottlenote.common.fixture;
+
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.picks.domain.Picks;
+import app.bottlenote.rating.domain.Rating;
+import app.bottlenote.user.domain.Follow;
+import app.bottlenote.user.domain.User;
+import java.util.List;
+
+/**
+ * 마이보틀 테스트용 복합 데이터 record
+ *
+ * 기존 init-user-mybottle-query.sql 대체용
+ */
+public record MyBottleTestData(
+ List users,
+ List alcohols,
+ List follows,
+ List picks,
+ List ratings) {
+
+ /**
+ * 특정 인덱스의 사용자 반환
+ *
+ * @param index 0-based index
+ * @return User 객체
+ */
+ public User getUser(int index) {
+ return users.get(index);
+ }
+
+ /**
+ * 특정 인덱스의 알코올 반환
+ *
+ * @param index 0-based index
+ * @return Alcohol 객체
+ */
+ public Alcohol getAlcohol(int index) {
+ return alcohols.get(index);
+ }
+
+ /**
+ * 특정 사용자의 찜 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자의 찜 목록
+ */
+ public List getPicksByUser(Long userId) {
+ return picks.stream().filter(p -> p.getUserId().equals(userId)).toList();
+ }
+
+ /**
+ * 특정 사용자의 별점 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자의 별점 목록
+ */
+ public List getRatingsByUser(Long userId) {
+ return ratings.stream().filter(r -> r.getId().getUserId().equals(userId)).toList();
+ }
+
+ /**
+ * 특정 사용자가 팔로우하는 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자가 팔로우하는 Follow 목록
+ */
+ public List getFollowingsByUser(Long userId) {
+ return follows.stream().filter(f -> f.getUserId().equals(userId)).toList();
+ }
+}
diff --git a/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyPageTestData.java b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyPageTestData.java
new file mode 100644
index 000000000..d91940ede
--- /dev/null
+++ b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/MyPageTestData.java
@@ -0,0 +1,71 @@
+package app.bottlenote.common.fixture;
+
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.rating.domain.Rating;
+import app.bottlenote.review.domain.Review;
+import app.bottlenote.user.domain.Follow;
+import app.bottlenote.user.domain.User;
+import java.util.List;
+
+/**
+ * 마이페이지 테스트용 복합 데이터 record
+ *
+ * 기존 init-user-mypage-query.sql 대체용
+ */
+public record MyPageTestData(
+ List users,
+ List alcohols,
+ List reviews,
+ List follows,
+ List ratings) {
+
+ /**
+ * 특정 인덱스의 사용자 반환
+ *
+ * @param index 0-based index
+ * @return User 객체
+ */
+ public User getUser(int index) {
+ return users.get(index);
+ }
+
+ /**
+ * 특정 인덱스의 알코올 반환
+ *
+ * @param index 0-based index
+ * @return Alcohol 객체
+ */
+ public Alcohol getAlcohol(int index) {
+ return alcohols.get(index);
+ }
+
+ /**
+ * 특정 사용자의 리뷰 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자의 리뷰 목록
+ */
+ public List getReviewsByUser(Long userId) {
+ return reviews.stream().filter(r -> r.getUserId().equals(userId)).toList();
+ }
+
+ /**
+ * 특정 사용자가 팔로우하는 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자가 팔로우하는 Follow 목록
+ */
+ public List getFollowingsByUser(Long userId) {
+ return follows.stream().filter(f -> f.getUserId().equals(userId)).toList();
+ }
+
+ /**
+ * 특정 사용자의 팔로워 목록 반환
+ *
+ * @param userId 사용자 ID
+ * @return 해당 사용자를 팔로우하는 Follow 목록
+ */
+ public List getFollowersByUser(Long userId) {
+ return follows.stream().filter(f -> f.getTargetUserId().equals(userId)).toList();
+ }
+}
diff --git a/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/TestDataSetupHelper.java b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/TestDataSetupHelper.java
new file mode 100644
index 000000000..b1f9150ec
--- /dev/null
+++ b/bottlenote-mono/src/test/java/app/bottlenote/common/fixture/TestDataSetupHelper.java
@@ -0,0 +1,249 @@
+package app.bottlenote.common.fixture;
+
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
+import app.bottlenote.history.constant.EventType;
+import app.bottlenote.history.domain.UserHistory;
+import app.bottlenote.history.fixture.HistoryTestFactory;
+import app.bottlenote.picks.constant.PicksStatus;
+import app.bottlenote.picks.domain.Picks;
+import app.bottlenote.picks.fixture.PicksTestFactory;
+import app.bottlenote.rating.domain.Rating;
+import app.bottlenote.rating.fixture.RatingTestFactory;
+import app.bottlenote.review.domain.Review;
+import app.bottlenote.review.fixture.ReviewTestFactory;
+import app.bottlenote.user.domain.Follow;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.fixture.UserTestFactory;
+import java.util.ArrayList;
+import java.util.List;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 복합 테스트 데이터 생성 헬퍼
+ *
+ * 기존 SQL 파일(init-user-mypage-query.sql, init-user-mybottle-query.sql, init-user-history.sql)을
+ * 대체하는 TestFactory 기반 데이터 생성 헬퍼
+ */
+@Component
+@RequiredArgsConstructor
+public class TestDataSetupHelper {
+
+ private final UserTestFactory userTestFactory;
+ private final AlcoholTestFactory alcoholTestFactory;
+ private final ReviewTestFactory reviewTestFactory;
+ private final RatingTestFactory ratingTestFactory;
+ private final PicksTestFactory picksTestFactory;
+ private final HistoryTestFactory historyTestFactory;
+
+ /**
+ * 마이페이지 테스트 데이터 생성
+ *
+ *
기존 init-user-mypage-query.sql 대체
+ *
+ *
+ * - 사용자 8명
+ *
- 알코올 5개
+ *
- 리뷰 5개 (user[2], user[3], user[0], user[1], user[4] 각각 1개)
+ *
- 팔로우 관계 3개
+ *
- 별점 3개
+ *
+ */
+ @Transactional
+ public MyPageTestData setupMyPageTestData() {
+ // 사용자 8명 생성
+ List users = new ArrayList<>();
+ for (int i = 0; i < 8; i++) {
+ users.add(userTestFactory.persistUser());
+ }
+
+ // 알코올 5개 생성
+ List alcohols = new ArrayList<>();
+ for (int i = 0; i < 5; i++) {
+ alcohols.add(alcoholTestFactory.persistAlcohol());
+ }
+
+ // 리뷰 5개 생성 (기존 SQL: user 3,4,1,2,5 순서 -> 0-indexed: 2,3,0,1,4)
+ List reviews = new ArrayList<>();
+ reviews.add(reviewTestFactory.persistReview(users.get(2), alcohols.get(0)));
+ reviews.add(reviewTestFactory.persistReview(users.get(3), alcohols.get(0)));
+ reviews.add(reviewTestFactory.persistReview(users.get(0), alcohols.get(0)));
+ reviews.add(reviewTestFactory.persistReview(users.get(1), alcohols.get(1)));
+ reviews.add(reviewTestFactory.persistReview(users.get(4), alcohols.get(1)));
+
+ // 팔로우 관계 3개 생성 (기존 SQL: 1->2, 2->3, 3->1)
+ List follows = new ArrayList<>();
+ follows.add(userTestFactory.persistFollow(users.get(0), users.get(1)));
+ follows.add(userTestFactory.persistFollow(users.get(1), users.get(2)));
+ follows.add(userTestFactory.persistFollow(users.get(2), users.get(0)));
+
+ // 별점 3개 생성 (기존 SQL: user1-alcohol1, user2-alcohol1, user3-alcohol2)
+ List ratings = new ArrayList<>();
+ ratings.add(ratingTestFactory.persistRating(users.get(0), alcohols.get(0), 5));
+ ratings.add(ratingTestFactory.persistRating(users.get(1), alcohols.get(0), 4));
+ ratings.add(ratingTestFactory.persistRating(users.get(2), alcohols.get(1), 5));
+
+ return new MyPageTestData(users, alcohols, reviews, follows, ratings);
+ }
+
+ /**
+ * 마이보틀 테스트 데이터 생성
+ *
+ * 기존 init-user-mybottle-query.sql 대체
+ *
+ *
+ * - 사용자 8명
+ *
- 알코올 8개
+ *
- 팔로우 관계 4개
+ *
- 찜 8개 (PICK 4개, UNPICK 4개)
+ *
- 별점 11개
+ *
+ */
+ @Transactional
+ public MyBottleTestData setupMyBottleTestData() {
+ // 사용자 8명 생성
+ List users = new ArrayList<>();
+ for (int i = 0; i < 8; i++) {
+ users.add(userTestFactory.persistUser());
+ }
+
+ // 알코올 8개 생성
+ List alcohols = new ArrayList<>();
+ for (int i = 0; i < 8; i++) {
+ alcohols.add(alcoholTestFactory.persistAlcohol());
+ }
+
+ // 팔로우 관계 4개 생성 (기존 SQL: 8->1, 8->2, 8->3, 3->1 / 0-indexed: 7->0, 7->1, 7->2, 2->0)
+ List follows = new ArrayList<>();
+ follows.add(userTestFactory.persistFollow(users.get(7), users.get(0)));
+ follows.add(userTestFactory.persistFollow(users.get(7), users.get(1)));
+ follows.add(userTestFactory.persistFollow(users.get(7), users.get(2)));
+ follows.add(userTestFactory.persistFollow(users.get(2), users.get(0)));
+
+ // 찜 8개 생성 (기존 SQL: PICK 4개, UNPICK 4개)
+ List picks = new ArrayList<>();
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(1).getId(), users.get(2).getId(), PicksStatus.PICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(2).getId(), users.get(3).getId(), PicksStatus.UNPICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(0).getId(), users.get(7).getId(), PicksStatus.PICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(3).getId(), users.get(3).getId(), PicksStatus.UNPICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(4).getId(), users.get(0).getId(), PicksStatus.UNPICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(5).getId(), users.get(0).getId(), PicksStatus.UNPICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(6).getId(), users.get(0).getId(), PicksStatus.PICK));
+ picks.add(
+ picksTestFactory.persistPicks(
+ alcohols.get(7).getId(), users.get(0).getId(), PicksStatus.PICK));
+
+ // 별점 11개 생성
+ List ratings = new ArrayList<>();
+ ratings.add(ratingTestFactory.persistRating(users.get(2), alcohols.get(0), 4)); // 3.5 -> 4
+ ratings.add(ratingTestFactory.persistRating(users.get(5), alcohols.get(0), 4)); // 3.5 -> 4
+ ratings.add(ratingTestFactory.persistRating(users.get(2), alcohols.get(1), 4)); // 3.5 -> 4
+ ratings.add(ratingTestFactory.persistRating(users.get(7), alcohols.get(1), 4)); // 3.5 -> 4
+ ratings.add(ratingTestFactory.persistRating(users.get(5), alcohols.get(1), 4));
+ ratings.add(ratingTestFactory.persistRating(users.get(0), alcohols.get(2), 5)); // 4.5 -> 5
+ ratings.add(ratingTestFactory.persistRating(users.get(0), alcohols.get(3), 5)); // 4.5 -> 5
+ ratings.add(ratingTestFactory.persistRating(users.get(0), alcohols.get(4), 4));
+ ratings.add(ratingTestFactory.persistRating(users.get(3), alcohols.get(5), 5));
+ ratings.add(ratingTestFactory.persistRating(users.get(0), alcohols.get(6), 5)); // 4.5 -> 5
+ ratings.add(ratingTestFactory.persistRating(users.get(3), alcohols.get(0), 1)); // 0.5 -> 1
+
+ return new MyBottleTestData(users, alcohols, follows, picks, ratings);
+ }
+
+ /**
+ * 히스토리 테스트 데이터 생성
+ *
+ * 기존 init-user-history.sql 대체
+ *
+ *
+ * - 사용자 8명
+ *
- 알코올 5개
+ *
- 사용자 히스토리 5개 (RATING 1개, REVIEW 3개, PICK 1개)
+ *
+ */
+ @Transactional
+ public HistoryTestData setupHistoryTestData() {
+ // 사용자 8명 생성
+ List users = new ArrayList<>();
+ for (int i = 0; i < 8; i++) {
+ users.add(userTestFactory.persistUser());
+ }
+
+ // 알코올 5개 생성
+ List alcohols = new ArrayList<>();
+ for (int i = 0; i < 5; i++) {
+ alcohols.add(alcoholTestFactory.persistAlcohol());
+ }
+
+ // 히스토리 5개 생성 (user[0] 기준)
+ List histories = new ArrayList<>();
+ histories.add(
+ historyTestFactory.persistUserHistory(
+ users.get(0).getId(), EventType.START_RATING, alcohols.get(0).getId()));
+ histories.add(
+ historyTestFactory.persistUserHistory(
+ users.get(0).getId(), EventType.REVIEW_CREATE, alcohols.get(0).getId(), "blah blah"));
+ histories.add(
+ historyTestFactory.persistUserHistory(
+ users.get(0).getId(), EventType.REVIEW_CREATE, alcohols.get(1).getId(), "리뷰입니다."));
+ histories.add(
+ historyTestFactory.persistUserHistory(
+ users.get(0).getId(), EventType.REVIEW_CREATE, alcohols.get(2).getId(), "리뷰 등록"));
+ histories.add(
+ historyTestFactory.persistUserHistory(
+ users.get(0).getId(), EventType.UNPICK, alcohols.get(0).getId()));
+
+ return new HistoryTestData(users, alcohols, histories);
+ }
+
+ /**
+ * 기본 사용자와 알코올만 생성 (단순 테스트용)
+ *
+ * 기존 init-user.sql + init-alcohol.sql 대체 (간소화 버전)
+ *
+ * @param userCount 생성할 사용자 수
+ * @param alcoholCount 생성할 알코올 수
+ * @return 사용자 목록과 알코올 목록
+ */
+ @Transactional
+ public SimpleTestData setupSimpleTestData(int userCount, int alcoholCount) {
+ List users = new ArrayList<>();
+ for (int i = 0; i < userCount; i++) {
+ users.add(userTestFactory.persistUser());
+ }
+
+ List alcohols = new ArrayList<>();
+ for (int i = 0; i < alcoholCount; i++) {
+ alcohols.add(alcoholTestFactory.persistAlcohol());
+ }
+
+ return new SimpleTestData(users, alcohols);
+ }
+
+ /** 기본 테스트 데이터 record */
+ public record SimpleTestData(List users, List alcohols) {
+ public User getUser(int index) {
+ return users.get(index);
+ }
+
+ public Alcohol getAlcohol(int index) {
+ return alcohols.get(index);
+ }
+ }
+}
diff --git a/bottlenote-mono/src/test/java/app/bottlenote/user/fixture/UserTestFactory.java b/bottlenote-mono/src/test/java/app/bottlenote/user/fixture/UserTestFactory.java
index 4b4ca913f..a1d2a4d6d 100644
--- a/bottlenote-mono/src/test/java/app/bottlenote/user/fixture/UserTestFactory.java
+++ b/bottlenote-mono/src/test/java/app/bottlenote/user/fixture/UserTestFactory.java
@@ -62,6 +62,24 @@ public User persistUser(@NotNull String email, @NotNull String nickName) {
return user;
}
+ /** 특정 닉네임으로 User 생성 (닉네임 중복 테스트용) */
+ @Transactional
+ @NotNull
+ public User persistUserWithNickname(@NotNull String nickName) {
+ User user =
+ User.builder()
+ .email("user" + generateRandomSuffix() + "@example.com")
+ .nickName(nickName)
+ .age(25)
+ .gender(GenderType.MALE)
+ .socialType(List.of(SocialType.KAKAO))
+ .role(UserType.ROLE_USER)
+ .build();
+ em.persist(user);
+ em.flush();
+ return user;
+ }
+
/** 빌더를 통한 User 생성 - 누락 필드 자동 채우기 */
@Transactional
@NotNull
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/global/config/JpaAuditingIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/global/config/JpaAuditingIntegrationTest.java
index 6d07acd54..c73bd8cec 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/global/config/JpaAuditingIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/global/config/JpaAuditingIntegrationTest.java
@@ -8,48 +8,43 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.review.domain.Review;
import app.bottlenote.review.domain.ReviewRepository;
import app.bottlenote.review.dto.request.ReviewCreateRequest;
import app.bottlenote.review.fixture.ReviewObjectFixture;
-import app.bottlenote.user.constant.SocialType;
-import app.bottlenote.user.dto.request.OauthRequest;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@DisplayName("[integration] [infra] JpaAuditing")
class JpaAuditingIntegrationTest extends IntegrationTestSupport {
- private ReviewCreateRequest reviewCreateRequest;
- private OauthRequest oauthRequest;
-
@Autowired private ReviewRepository reviewRepository;
-
- @BeforeEach
- void setUp() {
- oauthRequest = new OauthRequest("chadongmin@naver.com", null, SocialType.KAKAO, null, null);
- reviewCreateRequest = ReviewObjectFixture.getReviewCreateRequest();
- }
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
@DisplayName("DB 저장 시 생성자와 수정자가 기록된다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@Test
void test_1() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+
+ ReviewCreateRequest reviewCreateRequest =
+ ReviewObjectFixture.getReviewCreateRequestWithAlcoholId(alcohol.getId());
+
// when
MvcResult result =
mockMvc
@@ -57,7 +52,7 @@ void test_1() throws Exception {
post("/api/v1/reviews")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(reviewCreateRequest))
- .header("Authorization", "Bearer " + getToken(oauthRequest).accessToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -73,6 +68,6 @@ void test_1() throws Exception {
Review savedReview = reviewRepository.findById(review.getId()).orElseGet(null);
- assertEquals(oauthRequest.email(), savedReview.getCreateBy());
+ assertEquals(user.getEmail(), savedReview.getCreateBy());
}
}
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/history/integration/UserHistoryIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/history/integration/UserHistoryIntegrationTest.java
index ac7982eb3..bbc665401 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/history/integration/UserHistoryIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/history/integration/UserHistoryIntegrationTest.java
@@ -4,11 +4,15 @@
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.common.fixture.HistoryTestData;
+import app.bottlenote.common.fixture.TestDataSetupHelper;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.global.service.cursor.SortOrder;
import app.bottlenote.history.dto.response.UserHistoryItem;
import app.bottlenote.history.dto.response.UserHistorySearchResponse;
import app.bottlenote.picks.constant.PicksStatus;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.List;
@@ -16,27 +20,30 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@DisplayName("[integration] [history] UserHistory")
class UserHistoryIntegrationTest extends IntegrationTestSupport {
- @Sql(scripts = {"/init-script/init-user-history.sql"})
+ @Autowired private TestDataSetupHelper testDataSetupHelper;
+
@DisplayName("파라미터 없이 유저 히스토리를 조회할 수 있다.")
@Test
void test_1() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult result =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andReturn();
@@ -52,19 +59,20 @@ void test_1() throws Exception {
Assertions.assertNotNull(userHistorySearchResponse.userHistories());
}
- @Sql(scripts = {"/init-script/init-user-history.sql"})
@DisplayName("유저 히스토리를 정렬해서 조회할 수 있다.")
@Test
void test_2() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult result =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.param("sortOrder", SortOrder.DESC.name())
.with(csrf()))
.andReturn();
@@ -90,19 +98,20 @@ void test_2() throws Exception {
Assertions.assertEquals(userHistories.size(), userHistorySearchResponse.totalCount());
}
- @Sql(scripts = {"/init-script/init-user-history.sql"})
@DisplayName("날짜 검색조건으로 유저 히스토리를 조회할 수 있다.")
@Test
void test_3() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult initialMvcResult =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andReturn();
@@ -123,9 +132,9 @@ void test_3() throws Exception {
MvcResult filteredMvcResult =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.param("startDate", createdAtList.get(0).toString())
.param("endDate", createdAtList.get(1).toString())
.with(csrf()))
@@ -153,19 +162,20 @@ void test_3() throws Exception {
}
}
- @Sql(scripts = {"/init-script/init-user-history.sql"})
@DisplayName("별점으로 유저 히스토리 필터링하여 조회할 수 있다.")
@Test
void test_4() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult result =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.param("ratingPoint", "5")
.with(csrf()))
.andReturn();
@@ -181,19 +191,20 @@ void test_4() throws Exception {
Assertions.assertNotNull(userHistorySearchResponse.userHistories());
}
- @Sql(scripts = {"/init-script/init-user-history.sql"})
@DisplayName("찜/찜 해제 검색조건으로 유저 히스토리를 조회할 수 있다.")
@Test
void test_5() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult result =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.param("picksStatus", PicksStatus.PICK.name())
.param("picksStatus", PicksStatus.UNPICK.name())
.with(csrf()))
@@ -210,19 +221,20 @@ void test_5() throws Exception {
Assertions.assertNotNull(userHistorySearchResponse.userHistories());
}
- @Sql(scripts = {"/init-script/init-user-history.sql"})
@DisplayName("리뷰 필터 조건으로 유저 히스토리를 조회할 수 있다.")
@Test
void test_6() throws Exception {
// given
- final Long targetUserId = 1L;
+ HistoryTestData data = testDataSetupHelper.setupHistoryTestData();
+ User targetUser = data.getUser(0);
+ TokenItem token = getToken(targetUser);
MvcResult result =
mockMvc
.perform(
- get("/api/v1/history/{targetUserId}", targetUserId)
+ get("/api/v1/history/{targetUserId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.param("historyReviewFilterType", "BEST_REVIEW")
.param("historyReviewFilterType", "REVIEW_LIKE")
.param("historyReviewFilterType", "REVIEW_REPLY")
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/like/integration/LikesIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/like/integration/LikesIntegrationTest.java
index 008a5502a..ac2df9390 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/like/integration/LikesIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/like/integration/LikesIntegrationTest.java
@@ -11,19 +11,25 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.like.constant.LikeStatus;
import app.bottlenote.like.domain.Likes;
import app.bottlenote.like.domain.LikesRepository;
import app.bottlenote.like.dto.request.LikesUpdateRequest;
import app.bottlenote.like.dto.response.LikesUpdateResponse;
+import app.bottlenote.review.domain.Review;
+import app.bottlenote.review.fixture.ReviewTestFactory;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@@ -31,26 +37,30 @@
class LikesIntegrationTest extends IntegrationTestSupport {
@Autowired private LikesRepository likesRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
+ @Autowired private ReviewTestFactory reviewTestFactory;
@DisplayName("좋아요를 등록할 수 있다.")
@Test
- @Sql(
- scripts = {
- "/init-script/init-user.sql",
- "/init-script/init-alcohol.sql",
- "/init-script/init-review.sql"
- })
void test_1() throws Exception {
+ // Given
+ User reviewAuthor = userTestFactory.persistUser();
+ User likeUser = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ TokenItem token = getToken(likeUser);
- LikesUpdateRequest likesUpdateRequest = new LikesUpdateRequest(1L, LikeStatus.LIKE);
+ LikesUpdateRequest likesUpdateRequest = new LikesUpdateRequest(review.getId(), LikeStatus.LIKE);
+ // When & Then
MvcResult result =
mockMvc
.perform(
put("/api/v1/likes")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(likesUpdateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -68,40 +78,44 @@ void test_1() throws Exception {
@DisplayName("좋아요를 해제 할 수 있다.")
@Test
- @Sql(
- scripts = {
- "/init-script/init-user.sql",
- "/init-script/init-alcohol.sql",
- "/init-script/init-review.sql"
- })
void test_2() throws Exception {
-
- LikesUpdateRequest likesUpdateRequest = new LikesUpdateRequest(1L, LikeStatus.LIKE);
- LikesUpdateRequest dislikesUpdateRequest = new LikesUpdateRequest(1L, LikeStatus.DISLIKE);
-
+ // Given
+ User reviewAuthor = userTestFactory.persistUser();
+ User likeUser = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ TokenItem token = getToken(likeUser);
+
+ LikesUpdateRequest likesUpdateRequest = new LikesUpdateRequest(review.getId(), LikeStatus.LIKE);
+ LikesUpdateRequest dislikesUpdateRequest =
+ new LikesUpdateRequest(review.getId(), LikeStatus.DISLIKE);
+
+ // When - 좋아요 등록
mockMvc
.perform(
put("/api/v1/likes")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(likesUpdateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists());
- Likes likes = likesRepository.findByReviewIdAndUserId(1L, getTokenUserId()).orElse(null);
+ Likes likes =
+ likesRepository.findByReviewIdAndUserId(review.getId(), likeUser.getId()).orElse(null);
assertNotNull(likes);
assertEquals(LikeStatus.LIKE, likes.getStatus());
+ // When - 좋아요 해제
MvcResult result =
mockMvc
.perform(
put("/api/v1/likes")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(dislikesUpdateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -109,13 +123,15 @@ void test_2() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String contentAsString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(contentAsString, GlobalResponse.class);
LikesUpdateResponse likesUpdateResponse =
mapper.convertValue(response.getData(), LikesUpdateResponse.class);
assertEquals(likesUpdateResponse.message(), DISLIKE.getMessage());
- Likes dislike = likesRepository.findByReviewIdAndUserId(1L, getTokenUserId()).orElse(null);
+ Likes dislike =
+ likesRepository.findByReviewIdAndUserId(review.getId(), likeUser.getId()).orElse(null);
assertNotNull(dislike);
assertEquals(LikeStatus.DISLIKE, dislike.getStatus());
}
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/picks/integration/PicksIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/picks/integration/PicksIntegrationTest.java
index bedf2fa68..8462af7bc 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/picks/integration/PicksIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/picks/integration/PicksIntegrationTest.java
@@ -13,18 +13,22 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.picks.domain.Picks;
import app.bottlenote.picks.domain.PicksRepository;
import app.bottlenote.picks.dto.request.PicksUpdateRequest;
import app.bottlenote.picks.dto.response.PicksUpdateResponse;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@@ -32,21 +36,27 @@
class PicksIntegrationTest extends IntegrationTestSupport {
@Autowired private PicksRepository picksRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
@DisplayName("찜을 등록할 수 있다.")
@Test
- @Sql(scripts = {"/init-script/init-user.sql", "/init-script/init-alcohol.sql"})
void test_1() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- PicksUpdateRequest picksUpdateRequest = new PicksUpdateRequest(1L, PICK);
+ PicksUpdateRequest picksUpdateRequest = new PicksUpdateRequest(alcohol.getId(), PICK);
+ // When & Then
MvcResult result =
mockMvc
.perform(
put("/api/v1/picks")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(picksUpdateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -64,35 +74,41 @@ void test_1() throws Exception {
@DisplayName("등록한 찜을 해제할 수 있다.")
@Test
- @Sql(scripts = {"/init-script/init-user.sql", "/init-script/init-alcohol.sql"})
void test_2() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- PicksUpdateRequest registerPicksRequest = new PicksUpdateRequest(1L, PICK);
- PicksUpdateRequest unregisterPicksRequest = new PicksUpdateRequest(1L, UNPICK);
+ PicksUpdateRequest registerPicksRequest = new PicksUpdateRequest(alcohol.getId(), PICK);
+ PicksUpdateRequest unregisterPicksRequest = new PicksUpdateRequest(alcohol.getId(), UNPICK);
+ // When - 찜 등록
mockMvc
.perform(
put("/api/v1/picks")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(registerPicksRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists());
- Picks picks = picksRepository.findByAlcoholIdAndUserId(1L, getTokenUserId()).orElse(null);
+ Picks picks =
+ picksRepository.findByAlcoholIdAndUserId(alcohol.getId(), user.getId()).orElse(null);
assertNotNull(picks);
assertEquals(PICK, picks.getStatus());
+ // When - 찜 해제
MvcResult result =
mockMvc
.perform(
put("/api/v1/picks")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(unregisterPicksRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -100,13 +116,15 @@ void test_2() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String contentAsString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(contentAsString, GlobalResponse.class);
PicksUpdateResponse picksUpdateResponse =
mapper.convertValue(response.getData(), PicksUpdateResponse.class);
assertEquals(picksUpdateResponse.message(), UNPICKED.message());
- Picks unPick = picksRepository.findByAlcoholIdAndUserId(1L, getTokenUserId()).orElse(null);
+ Picks unPick =
+ picksRepository.findByAlcoholIdAndUserId(alcohol.getId(), user.getId()).orElse(null);
assertNotNull(unPick);
assertEquals(UNPICK, unPick.getStatus());
}
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/rating/integration/RatingIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/rating/integration/RatingIntegrationTest.java
index 1ad8dabbd..3e1151d98 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/rating/integration/RatingIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/rating/integration/RatingIntegrationTest.java
@@ -11,48 +11,53 @@
import app.bottlenote.IntegrationTestSupport;
import app.bottlenote.alcohols.domain.Alcohol;
-import app.bottlenote.alcohols.domain.AlcoholQueryRepository;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.GlobalResponse;
-import app.bottlenote.rating.domain.Rating;
-import app.bottlenote.rating.domain.Rating.RatingId;
-import app.bottlenote.rating.domain.RatingPoint;
-import app.bottlenote.rating.domain.RatingRepository;
import app.bottlenote.rating.dto.request.RatingRegisterRequest;
import app.bottlenote.rating.dto.response.RatingListFetchResponse;
import app.bottlenote.rating.dto.response.RatingRegisterResponse;
import app.bottlenote.rating.dto.response.RatingRegisterResponse.Message;
import app.bottlenote.rating.dto.response.UserRatingResponse;
+import app.bottlenote.rating.fixture.RatingTestFactory;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
-@DisplayName("[integration] [controller] PickController")
+@DisplayName("[integration] [controller] RatingController")
class RatingIntegrationTest extends IntegrationTestSupport {
- @Autowired private AlcoholQueryRepository alcoholQueryRepository;
- @Autowired private RatingRepository ratingRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
+ @Autowired private RatingTestFactory ratingTestFactory;
@DisplayName("별점을 등록할 수 있다.")
@Test
- @Sql(scripts = {"/init-script/init-user.sql", "/init-script/init-alcohol.sql"})
void test_1() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- RatingRegisterRequest ratingRegisterRequest = new RatingRegisterRequest(1L, 3.0);
+ RatingRegisterRequest ratingRegisterRequest = new RatingRegisterRequest(alcohol.getId(), 3.0);
+ // When & Then
MvcResult result =
mockMvc
.perform(
post("/api/v1/rating/register")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(ratingRegisterRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -71,27 +76,28 @@ void test_1() throws Exception {
@DisplayName("별점 목록을 조회할 수 있다.")
@Test
- @Sql(scripts = {"/init-script/init-user.sql", "/init-script/init-alcohol.sql"})
void test_2() throws Exception {
- List alcohols = alcoholQueryRepository.findAll();
-
- alcohols.forEach(
- a -> {
- double ratingPoint = (double) a.getId() % 5;
- Rating rating =
- Rating.builder()
- .id(RatingId.is(getTokenUserId(), a.getId()))
- .ratingPoint(RatingPoint.of(ratingPoint))
- .build();
- ratingRepository.save(rating);
- });
-
+ // Given
+ User user = userTestFactory.persistUser();
+ List alcohols = new ArrayList<>();
+ for (int i = 0; i < 5; i++) {
+ alcohols.add(alcoholTestFactory.persistAlcohol());
+ }
+ TokenItem token = getToken(user);
+
+ // 각 알코올에 별점 등록
+ for (int i = 0; i < alcohols.size(); i++) {
+ int ratingPoint = (i % 5) + 1;
+ ratingTestFactory.persistRating(user, alcohols.get(i), ratingPoint);
+ }
+
+ // When
MvcResult result =
mockMvc
.perform(
get("/api/v1/rating")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -99,6 +105,7 @@ void test_2() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String contentAsString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(contentAsString, GlobalResponse.class);
RatingListFetchResponse ratingListFetchResponse =
@@ -109,27 +116,22 @@ void test_2() throws Exception {
@DisplayName("내가 매긴 특정 술의 별점을 조회할 수 있다.")
@Test
- @Sql(scripts = {"/init-script/init-user.sql", "/init-script/init-alcohol.sql"})
void test_3() throws Exception {
- List alcohols = alcoholQueryRepository.findAll();
-
- alcohols.forEach(
- a -> {
- double ratingPoint = (double) a.getId() % 5;
- Rating rating =
- Rating.builder()
- .id(RatingId.is(getTokenUserId(), a.getId()))
- .ratingPoint(RatingPoint.of(ratingPoint))
- .build();
- ratingRepository.save(rating);
- });
+ // Given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+
+ // 별점 1점 등록
+ ratingTestFactory.persistRating(user, alcohol, 1);
+ // When
MvcResult result =
mockMvc
.perform(
- get("/api/v1/rating/{alcoholId}", 1L)
+ get("/api/v1/rating/{alcoholId}", alcohol.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -137,6 +139,7 @@ void test_3() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String contentAsString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(contentAsString, GlobalResponse.class);
UserRatingResponse userRatingResponse =
@@ -144,7 +147,7 @@ void test_3() throws Exception {
assertNotNull(userRatingResponse);
assertEquals(1.0, userRatingResponse.rating());
- assertEquals(getTokenUserId(), userRatingResponse.userId());
- assertEquals(1, userRatingResponse.alcoholId());
+ assertEquals(user.getId(), userRatingResponse.userId());
+ assertEquals(alcohol.getId(), userRatingResponse.alcoholId());
}
}
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/review/fixture/ReviewObjectFixture.java b/bottlenote-product-api/src/test/java/app/bottlenote/review/fixture/ReviewObjectFixture.java
index 60af1c35c..7b5e1139f 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/review/fixture/ReviewObjectFixture.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/review/fixture/ReviewObjectFixture.java
@@ -160,8 +160,13 @@ public static ReviewModifyRequest getWrongReviewModifyRequest() {
/** 기본 ReviewCreateRequest 객체를 생성합니다. */
public static ReviewCreateRequest getReviewCreateRequest() {
+ return getReviewCreateRequestWithAlcoholId(1L);
+ }
+
+ /** alcoholId를 지정한 ReviewCreateRequest 객체를 생성합니다. */
+ public static ReviewCreateRequest getReviewCreateRequestWithAlcoholId(Long alcoholId) {
return new ReviewCreateRequest(
- 1L,
+ alcoholId,
ReviewDisplayStatus.PUBLIC,
"맛있어요",
SizeType.GLASS,
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewIntegrationTest.java
index ceb70c464..19dbe790b 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewIntegrationTest.java
@@ -15,6 +15,8 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.Error;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.global.exception.custom.code.ValidExceptionCode;
@@ -30,17 +32,19 @@
import app.bottlenote.review.dto.response.ReviewResultResponse;
import app.bottlenote.review.facade.payload.ReviewInfo;
import app.bottlenote.review.fixture.ReviewObjectFixture;
+import app.bottlenote.review.fixture.ReviewTestFactory;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
import java.util.List;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@@ -48,28 +52,28 @@
class ReviewIntegrationTest extends IntegrationTestSupport {
@Autowired private ReviewRepository reviewRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
+ @Autowired private ReviewTestFactory reviewTestFactory;
@Nested
@DisplayName("리뷰 조회 테스트")
class select {
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
+
@DisplayName("리뷰 목록 조회에 성공한다.")
@Test
void test_1() throws Exception {
// given
- Long alcoholId = 4L;
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ reviewTestFactory.persistReview(user, alcohol);
+ reviewTestFactory.persistReview(user, alcohol);
// when
MvcResult result =
mockMvc
.perform(
- get("/api/v1/reviews/{alcoholId}", alcoholId)
+ get("/api/v1/reviews/{alcoholId}", alcohol.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf()))
.andDo(print())
@@ -84,30 +88,28 @@ void test_1() throws Exception {
mapper.convertValue(response.getData(), ReviewListResponse.class);
List reviewInfos = reviewListResponse.reviewList();
- // when
+ // then
assertNotNull(reviewListResponse);
assertFalse(reviewInfos.isEmpty());
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("리뷰 상세 조회에 성공한다.")
@Test
void test_2() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- ReviewCreateRequest reviewCreateRequest = ReviewObjectFixture.getReviewCreateRequest();
+ ReviewCreateRequest reviewCreateRequest =
+ ReviewObjectFixture.getReviewCreateRequestWithAlcoholId(alcohol.getId());
MvcResult result =
mockMvc
.perform(
post("/api/v1/reviews")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsBytes(reviewCreateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -145,25 +147,23 @@ void test_2() throws Exception {
reviewCreateRequest.content(), reviewDetailResponse.reviewInfo().reviewContent());
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("내가 작성한 리뷰 조회에 성공한다.")
@Test
void test_3() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- List reviewList = reviewRepository.findByUserId(getTokenUserId());
+ Review review = reviewTestFactory.persistReview(user, alcohol);
+ List reviewList = reviewRepository.findByUserId(user.getId());
MvcResult result =
mockMvc
.perform(
- get("/api/v1/reviews/me/{alcoholId}", 1L)
+ get("/api/v1/reviews/me/{alcoholId}", alcohol.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -180,13 +180,13 @@ void test_3() throws Exception {
assertEquals(reviewList.size(), reviewListResponse.reviewList().size());
reviewList.forEach(
- review -> {
+ r -> {
ReviewInfo reviewInfo =
reviewListResponse.reviewList().stream()
- .filter(info -> info.reviewId().equals(review.getId()))
+ .filter(info -> info.reviewId().equals(r.getId()))
.findFirst()
.orElseThrow();
- assertEquals(review.getContent(), reviewInfo.reviewContent());
+ assertEquals(r.getContent(), reviewInfo.reviewContent());
});
}
}
@@ -195,18 +195,16 @@ void test_3() throws Exception {
@DisplayName("리뷰 생성 테스트")
class create {
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("모든 필드가 포함된 리뷰 생성에 성공한다.")
@Test
void test_1() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
- ReviewCreateRequest reviewCreateRequest = ReviewObjectFixture.getReviewCreateRequest();
+ ReviewCreateRequest reviewCreateRequest =
+ ReviewObjectFixture.getReviewCreateRequestWithAlcoholId(alcohol.getId());
MvcResult result =
mockMvc
@@ -214,7 +212,7 @@ void test_1() throws Exception {
post("/api/v1/reviews")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsBytes(reviewCreateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -233,20 +231,18 @@ void test_1() throws Exception {
@Nested
@DisplayName("리뷰 삭제 테스트")
- class delete {
-
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
+ class deleteTest {
+
@DisplayName("리뷰 삭제에 성공한다. (목록 조회 시 미노출)")
@Test
void test_1() throws Exception {
- // 리뷰 생성
- ReviewCreateRequest reviewCreateRequest = ReviewObjectFixture.getReviewCreateRequest();
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+
+ ReviewCreateRequest reviewCreateRequest =
+ ReviewObjectFixture.getReviewCreateRequestWithAlcoholId(alcohol.getId());
MvcResult result =
mockMvc
@@ -254,7 +250,7 @@ void test_1() throws Exception {
post("/api/v1/reviews")
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsBytes(reviewCreateRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -275,7 +271,7 @@ void test_1() throws Exception {
.perform(
delete("/api/v1/reviews/{reviewId}", reviewId)
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -316,25 +312,16 @@ void test_1() throws Exception {
@DisplayName("리뷰 수정 테스트")
class update {
- @BeforeEach
- void setUp() {
- final Long tokenUserId = getTokenUserId();
- Review review = ReviewObjectFixture.getReviewFixture(1L, tokenUserId, "content1");
- reviewRepository.save(review);
- }
-
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("리뷰 수정에 성공한다.")
@Test
void test_1() throws Exception {
- final Long tokenUserId = getTokenUserId();
- final Long reviewId = reviewRepository.findByUserId(tokenUserId).get(0).getId();
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+ Review review = reviewTestFactory.persistReview(user, alcohol);
+
+ final Long reviewId = review.getId();
final ReviewModifyRequest request =
ReviewObjectFixture.getReviewModifyRequest(ReviewDisplayStatus.PUBLIC);
@@ -343,7 +330,7 @@ void test_1() throws Exception {
patch("/api/v1/reviews/{reviewId}", reviewId)
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(request))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -354,18 +341,16 @@ void test_1() throws Exception {
assertEquals(savedReview.getContent(), request.content());
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("content와 status를 제외한 필드에 null이 할당되어도 수정에 성공한다.")
@Test
void test_2() throws Exception {
- final Long tokenUserId = getTokenUserId();
- final Long reviewId = reviewRepository.findByUserId(tokenUserId).get(0).getId();
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+ Review review = reviewTestFactory.persistReview(user, alcohol);
+
+ final Long reviewId = review.getId();
final ReviewModifyRequest request =
ReviewObjectFixture.getNullableReviewModifyRequest(ReviewDisplayStatus.PRIVATE);
@@ -374,7 +359,7 @@ void test_2() throws Exception {
patch("/api/v1/reviews/{reviewId}", reviewId)
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(request))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -387,21 +372,19 @@ void test_2() throws Exception {
assertEquals(savedReview.getContent(), request.content());
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("Not Null인 필드에 null이 할당되면 리뷰 수정에 실패한다.")
@Test
void test_3() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+ Review review = reviewTestFactory.persistReview(user, alcohol);
+
final Error notNullEmpty = Error.of(ValidExceptionCode.REVIEW_CONTENT_REQUIRED);
final Error notStatusEmpty = Error.of(ValidExceptionCode.REVIEW_DISPLAY_STATUS_NOT_EMPTY);
- final Long tokenUserId = getTokenUserId();
- final Long reviewId = reviewRepository.findByUserId(tokenUserId).get(0).getId();
+ final Long reviewId = review.getId();
final ReviewModifyRequest request = ReviewObjectFixture.getWrongReviewModifyRequest();
mockMvc
@@ -409,7 +392,7 @@ void test_3() throws Exception {
patch("/api/v1/reviews/{reviewId}", reviewId)
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(request))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andExpect(status().isBadRequest())
.andDo(print())
@@ -429,19 +412,16 @@ void test_3() throws Exception {
.andReturn();
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("리뷰 상태 변경에 성공한다.")
@Test
void test_4() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+ Review review = reviewTestFactory.persistReview(user, alcohol);
- final Long tokenUserId = getTokenUserId();
- final Long reviewId = reviewRepository.findByUserId(tokenUserId).get(0).getId();
+ final Long reviewId = review.getId();
final ReviewModifyRequest request =
ReviewObjectFixture.getReviewModifyRequest(ReviewDisplayStatus.PRIVATE);
@@ -450,7 +430,7 @@ void test_4() throws Exception {
patch("/api/v1/reviews/{reviewId}/display", reviewId)
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(request))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -461,28 +441,26 @@ void test_4() throws Exception {
assertEquals(ReviewDisplayStatus.PRIVATE, savedReview.getStatus());
}
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@DisplayName("Not null인 필드에 null이 할당되면 리뷰 상태 변경에 실패한다.")
@Test
void test_5() throws Exception {
+ // given
+ User user = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ TokenItem token = getToken(user);
+ Review review = reviewTestFactory.persistReview(user, alcohol);
+
final Error notStatusEmpty = Error.of(ValidExceptionCode.REVIEW_DISPLAY_STATUS_NOT_EMPTY);
final ReviewModifyRequest request = ReviewObjectFixture.getNullableReviewModifyRequest(null);
- final Long tokenUserId = getTokenUserId();
- final Long reviewId = reviewRepository.findByUserId(tokenUserId).get(0).getId();
+ final Long reviewId = review.getId();
mockMvc
.perform(
patch("/api/v1/reviews/{reviewId}/display", reviewId)
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(request))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isBadRequest())
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewReplyIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewReplyIntegrationTest.java
index 403a8416a..e940533cf 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewReplyIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/review/integration/ReviewReplyIntegrationTest.java
@@ -11,15 +11,21 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.review.constant.ReviewReplyResultMessage;
-import app.bottlenote.review.constant.ReviewReplyStatus;
+import app.bottlenote.review.domain.Review;
import app.bottlenote.review.domain.ReviewReply;
import app.bottlenote.review.domain.ReviewReplyRepository;
import app.bottlenote.review.dto.request.ReviewReplyRegisterRequest;
import app.bottlenote.review.dto.response.ReviewReplyResponse;
import app.bottlenote.review.dto.response.RootReviewReplyResponse;
import app.bottlenote.review.dto.response.SubReviewReplyResponse;
+import app.bottlenote.review.fixture.ReviewTestFactory;
+import app.bottlenote.user.domain.User;
+import app.bottlenote.user.dto.response.TokenItem;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
@@ -27,7 +33,6 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@@ -35,33 +40,34 @@
class ReviewReplyIntegrationTest extends IntegrationTestSupport {
@Autowired private ReviewReplyRepository reviewReplyRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
+ @Autowired private ReviewTestFactory reviewTestFactory;
@Nested
@DisplayName("리뷰 댓글 생성 테스트")
class create {
@DisplayName("리뷰의 댓글을 생성할 수 있다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@Test
void test_1() throws Exception {
+ // given
+ User reviewAuthor = userTestFactory.persistUser();
+ User replyAuthor = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ TokenItem token = getToken(replyAuthor);
ReviewReplyRegisterRequest replyRegisterRequest =
new ReviewReplyRegisterRequest("댓글 내용", null);
- final Long reviewId = 1L;
MvcResult result =
mockMvc
.perform(
- post("/api/v1/review/reply/register/{reviewId}", reviewId)
+ post("/api/v1/review/reply/register/{reviewId}", review.getId())
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(replyRegisterRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -79,35 +85,26 @@ void test_1() throws Exception {
}
@DisplayName("댓글의 대댓글을 생성할 수 있다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql"
- })
@Test
void test_2() throws Exception {
-
- final Long reviewId = 1L;
- ReviewReply savedReply =
- reviewReplyRepository.save(
- ReviewReply.builder()
- .reviewId(reviewId)
- .userId(getTokenUserId())
- .content("댓글 내용")
- .status(ReviewReplyStatus.NORMAL)
- .build());
+ // given
+ User reviewAuthor = userTestFactory.persistUser();
+ User replyAuthor = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ ReviewReply parentReply = reviewTestFactory.persistReviewReply(review, replyAuthor);
+ TokenItem token = getToken(replyAuthor);
ReviewReplyRegisterRequest replyRegisterRequest =
- new ReviewReplyRegisterRequest("대댓글 내용", savedReply.getId());
+ new ReviewReplyRegisterRequest("대댓글 내용", parentReply.getId());
MvcResult result =
mockMvc
.perform(
- post("/api/v1/review/reply/register/{reviewId}", reviewId)
+ post("/api/v1/review/reply/register/{reviewId}", review.getId())
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(replyRegisterRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -130,23 +127,22 @@ void test_2() throws Exception {
class read {
@DisplayName("리뷰의 최상위 댓글을 조회할 수 있다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql",
- "/init-script/init-review-reply.sql"
- })
@Test
void test_1() throws Exception {
-
// given
- final Long reviewId = 4L;
+ User reviewAuthor = userTestFactory.persistUser();
+ User replyAuthor1 = userTestFactory.persistUser();
+ User replyAuthor2 = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ reviewTestFactory.persistReviewReply(review, replyAuthor1);
+ reviewTestFactory.persistReviewReply(review, replyAuthor2);
+
// when && then
MvcResult result =
mockMvc
.perform(
- get("/api/v1/review/reply/{reviewId}", reviewId)
+ get("/api/v1/review/reply/{reviewId}", review.getId())
.contentType(MediaType.APPLICATION_JSON)
.param("cursor", "0")
.param("pageSize", "50")
@@ -163,36 +159,27 @@ void test_1() throws Exception {
}
@DisplayName("리뷰의 대댓글 목록을 조회할 수 있다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql"
- })
@Test
void test_2() throws Exception {
-
- final Long reviewId = 1L;
- ReviewReply savedReply =
- reviewReplyRepository.save(
- ReviewReply.builder()
- .reviewId(reviewId)
- .userId(getTokenUserId())
- .content("댓글 내용")
- .status(ReviewReplyStatus.NORMAL)
- .build());
+ // given
+ User reviewAuthor = userTestFactory.persistUser();
+ User replyAuthor = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ ReviewReply parentReply = reviewTestFactory.persistReviewReply(review, replyAuthor);
+ TokenItem token = getToken(replyAuthor);
ReviewReplyRegisterRequest replyRegisterRequest =
- new ReviewReplyRegisterRequest("대댓글 내용", savedReply.getId());
+ new ReviewReplyRegisterRequest("대댓글 내용", parentReply.getId());
final int count = 2;
for (int i = 0; i < count; i++) {
mockMvc
.perform(
- post("/api/v1/review/reply/register/{reviewId}", reviewId)
+ post("/api/v1/review/reply/register/{reviewId}", review.getId())
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(replyRegisterRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -205,11 +192,11 @@ void test_2() throws Exception {
.perform(
get(
"/api/v1/review/reply/{reviewId}/sub/{rootReplyId}",
- reviewId,
- savedReply.getId())
+ review.getId(),
+ parentReply.getId())
.contentType(MediaType.APPLICATION_JSON)
.content(mapper.writeValueAsString(replyRegisterRequest))
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -228,34 +215,29 @@ void test_2() throws Exception {
@Nested
@DisplayName("리뷰 댓글 삭제 테스트")
- class delete {
+ class deleteTest {
@DisplayName("리뷰 댓글을 삭제할 수 있다.")
- @Sql(
- scripts = {
- "/init-script/init-alcohol.sql",
- "/init-script/init-user.sql",
- "/init-script/init-review.sql"
- })
@Test
void test_1() throws Exception {
-
- final Long reviewId = 1L;
-
- ReviewReply savedReply =
- reviewReplyRepository.save(
- ReviewReply.builder()
- .reviewId(reviewId)
- .userId(getTokenUserId())
- .content("댓글 내용")
- .status(ReviewReplyStatus.NORMAL)
- .build());
+ // given
+ User reviewAuthor = userTestFactory.persistUser();
+ User replyAuthor1 = userTestFactory.persistUser();
+ User replyAuthor2 = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ Review review = reviewTestFactory.persistReview(reviewAuthor, alcohol);
+ ReviewReply replyToDelete = reviewTestFactory.persistReviewReply(review, replyAuthor1);
+ reviewTestFactory.persistReviewReply(review, replyAuthor2);
+ TokenItem token = getToken(replyAuthor1);
mockMvc
.perform(
- delete("/api/v1/review/reply/{reviewId}/{replyId}", reviewId, savedReply.getId())
+ delete(
+ "/api/v1/review/reply/{reviewId}/{replyId}",
+ review.getId(),
+ replyToDelete.getId())
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -265,7 +247,7 @@ void test_1() throws Exception {
MvcResult result =
mockMvc
.perform(
- get("/api/v1/review/reply/{reviewId}", reviewId)
+ get("/api/v1/review/reply/{reviewId}", review.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf()))
.andDo(print())
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserCommandIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserCommandIntegrationTest.java
index 28c73e939..11f7172b3 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserCommandIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserCommandIntegrationTest.java
@@ -15,7 +15,6 @@
import app.bottlenote.global.data.response.GlobalResponse;
import app.bottlenote.user.constant.SocialType;
import app.bottlenote.user.constant.UserStatus;
-import app.bottlenote.user.constant.UserType;
import app.bottlenote.user.domain.User;
import app.bottlenote.user.domain.UserRepository;
import app.bottlenote.user.dto.request.NicknameChangeRequest;
@@ -23,18 +22,18 @@
import app.bottlenote.user.dto.request.ProfileImageChangeRequest;
import app.bottlenote.user.dto.response.NicknameChangeResponse;
import app.bottlenote.user.dto.response.ProfileImageChangeResponse;
+import app.bottlenote.user.dto.response.TokenItem;
import app.bottlenote.user.dto.response.WithdrawUserResultResponse;
import app.bottlenote.user.exception.UserExceptionCode;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
-import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@@ -43,20 +42,22 @@
class UserCommandIntegrationTest extends IntegrationTestSupport {
@Autowired private UserRepository userRepository;
+ @Autowired private UserTestFactory userTestFactory;
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("회원탈퇴에 성공한다.")
@Test
void test_1() throws Exception {
- // given
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+
+ // When
MvcResult result =
mockMvc
.perform(
delete("/api/v1/users")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -64,6 +65,7 @@ void test_1() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(responseString, GlobalResponse.class);
WithdrawUserResultResponse withdrawUserResultResponse =
@@ -74,23 +76,25 @@ void test_1() throws Exception {
.ifPresent(withdraw -> assertEquals(DELETED, withdraw.getStatus()));
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("탈퇴한 회원이 다시 탈퇴하는 경우 성공")
@Test
void test_2() throws Exception {
- // given
- final User firstUser = authSupport.getFirstUser();
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+
+ // 사용자를 탈퇴 상태로 변경
Field statusField = User.class.getDeclaredField("status");
statusField.setAccessible(true);
- statusField.set(firstUser, UserStatus.DELETED);
+ statusField.set(user, UserStatus.DELETED);
+ userRepository.save(user);
+ // When & Then
mockMvc
.perform(
delete("/api/v1/users")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -98,33 +102,33 @@ void test_2() throws Exception {
.andExpect(jsonPath("$.data").exists());
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("탈퇴한 회원이 재로그인 하는 경우 예외가 발생한다.")
@Test
void test_3() throws Exception {
- // given
- final User firstUser = authSupport.getFirstUser();
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+ // 먼저 회원 탈퇴
mockMvc
.perform(
delete("/api/v1/users")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists());
+ // When - 재로그인 시도
mockMvc
.perform(
post("/api/v1/oauth/login")
.contentType(MediaType.APPLICATION_JSON)
.content(
mapper.writeValueAsString(
- new OauthRequest(firstUser.getEmail(), null, SocialType.KAKAO, null, null)))
+ new OauthRequest(user.getEmail(), null, SocialType.KAKAO, null, null)))
.with(csrf()))
.andDo(print())
.andExpect(status().isBadRequest())
@@ -135,19 +139,20 @@ void test_3() throws Exception {
jsonPath("$.errors[0].message").value(UserExceptionCode.USER_DELETED.getMessage()));
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("닉네임 변경에 성공한다.")
@Test
void test_4() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+ // When
MvcResult result =
mockMvc
.perform(
patch("/api/v1/users/nickname")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.content(mapper.writeValueAsString(new NicknameChangeRequest("newNickname")))
.with(csrf()))
.andDo(print())
@@ -156,6 +161,7 @@ void test_4() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(responseString, GlobalResponse.class);
NicknameChangeResponse nicknameChangeResponse =
@@ -164,29 +170,21 @@ void test_4() throws Exception {
assertEquals("newNickname", nicknameChangeResponse.getChangedNickname());
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("이미 존재하는 닉네임으로 변경할 수 없다.")
@Test
void test_5() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ User otherUser = userTestFactory.persistUserWithNickname("중복닉네임");
+ TokenItem token = getToken(user);
- // 중복 닉네임 생성
- userRepository.save(
- User.builder()
- .email("test@email.com")
- .password("password")
- .nickName("fail")
- .role(UserType.ROLE_USER)
- .socialType(List.of(SocialType.KAKAO))
- .build());
-
+ // When & Then
mockMvc
.perform(
patch("/api/v1/users/nickname")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
- .content(mapper.writeValueAsString(new NicknameChangeRequest("fail")))
+ .header("Authorization", "Bearer " + token.accessToken())
+ .content(mapper.writeValueAsString(new NicknameChangeRequest("중복닉네임")))
.with(csrf()))
.andDo(print())
.andExpect(status().isBadRequest())
@@ -199,19 +197,20 @@ void test_5() throws Exception {
.value(UserExceptionCode.USER_NICKNAME_NOT_VALID.getMessage()));
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("프로필 이미지 변경에 성공한다.")
@Test
void test_6() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+ // When
MvcResult result =
mockMvc
.perform(
patch("/api/v1/users/profile-image")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.content(
mapper.writeValueAsString(
new ProfileImageChangeRequest("newProfileImageUrl")))
@@ -222,6 +221,7 @@ void test_6() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(responseString, GlobalResponse.class);
ProfileImageChangeResponse profileImageChangeResponse =
@@ -230,19 +230,20 @@ void test_6() throws Exception {
assertEquals("newProfileImageUrl", profileImageChangeResponse.profileImageUrl());
}
- @Sql(
- scripts = {"/init-script/init-user.sql"},
- executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD)
@DisplayName("프로필 이미지에 null을 넣는 경우 변경에 성공한다.(삭제)")
@Test
void test_7() throws Exception {
+ // Given
+ User user = userTestFactory.persistUser();
+ TokenItem token = getToken(user);
+ // When
MvcResult result =
mockMvc
.perform(
patch("/api/v1/users/profile-image")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + getToken())
+ .header("Authorization", "Bearer " + token.accessToken())
.content(mapper.writeValueAsString(new ProfileImageChangeRequest(null)))
.with(csrf()))
.andDo(print())
@@ -251,6 +252,7 @@ void test_7() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse response = mapper.readValue(responseString, GlobalResponse.class);
ProfileImageChangeResponse profileImageChangeResponse =
diff --git a/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserQueryIntegrationTest.java b/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserQueryIntegrationTest.java
index 25d49842a..43ba78aae 100644
--- a/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserQueryIntegrationTest.java
+++ b/bottlenote-product-api/src/test/java/app/bottlenote/user/integration/UserQueryIntegrationTest.java
@@ -10,17 +10,22 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import app.bottlenote.IntegrationTestSupport;
+import app.bottlenote.alcohols.domain.Alcohol;
+import app.bottlenote.alcohols.fixture.AlcoholTestFactory;
+import app.bottlenote.common.fixture.MyPageTestData;
+import app.bottlenote.common.fixture.TestDataSetupHelper;
import app.bottlenote.global.data.response.Error;
import app.bottlenote.global.data.response.GlobalResponse;
-import app.bottlenote.user.constant.FollowStatus;
-import app.bottlenote.user.domain.Follow;
-import app.bottlenote.user.domain.FollowRepository;
+import app.bottlenote.rating.fixture.RatingTestFactory;
+import app.bottlenote.review.fixture.ReviewTestFactory;
import app.bottlenote.user.domain.User;
-import app.bottlenote.user.domain.UserRepository;
import app.bottlenote.user.dto.response.FollowerSearchResponse;
import app.bottlenote.user.dto.response.FollowingSearchResponse;
+import app.bottlenote.user.dto.response.TokenItem;
import app.bottlenote.user.exception.UserExceptionCode;
+import app.bottlenote.user.fixture.UserTestFactory;
import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
@@ -28,108 +33,100 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
-import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.web.servlet.MvcResult;
@Tag("integration")
@DisplayName("[integration] [controller] UserQueryController")
class UserQueryIntegrationTest extends IntegrationTestSupport {
- @Autowired private FollowRepository followRepository;
- @Autowired private UserRepository userRepository;
+ @Autowired private UserTestFactory userTestFactory;
+ @Autowired private AlcoholTestFactory alcoholTestFactory;
+ @Autowired private ReviewTestFactory reviewTestFactory;
+ @Autowired private RatingTestFactory ratingTestFactory;
+ @Autowired private TestDataSetupHelper testDataSetupHelper;
@Nested
@DisplayName("팔로우/팔로잉")
class Follower {
@DisplayName("유저는 자신의 팔로잉 목록을 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user.sql"})
@Test
void test_1() throws Exception {
-
- final Long tokenUserId = getTokenUserId();
-
- List allUsers =
- userRepository.findAll().stream()
- .filter(userId -> !userId.getId().equals(tokenUserId))
- .toList();
-
- allUsers.forEach(
- u -> {
- Follow follow =
- Follow.builder()
- .userId(tokenUserId)
- .targetUserId(u.getId())
- .status(FollowStatus.FOLLOWING)
- .build();
- followRepository.save(follow);
- });
-
+ // Given
+ User me = userTestFactory.persistUser();
+ List otherUsers = new ArrayList<>();
+ for (int i = 0; i < 5; i++) {
+ otherUsers.add(userTestFactory.persistUser());
+ }
+ TokenItem token = getToken(me);
+
+ // 팔로잉 관계 생성
+ for (User target : otherUsers) {
+ userTestFactory.persistFollow(me, target);
+ }
+
+ // When
MvcResult result =
mockMvc
.perform(
- get("/api/v1/follow/{userId}/following-list", tokenUserId)
+ get("/api/v1/follow/{userId}/following-list", me.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf())
- .header("Authorization", "Bearer " + getToken()))
+ .header("Authorization", "Bearer " + token.accessToken()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse globalResponse = mapper.readValue(responseString, GlobalResponse.class);
FollowingSearchResponse followingSearchResponse =
mapper.convertValue(globalResponse.getData(), FollowingSearchResponse.class);
assertNotNull(followingSearchResponse);
- assertEquals(followingSearchResponse.totalCount(), allUsers.size());
+ assertEquals(followingSearchResponse.totalCount(), otherUsers.size());
}
@DisplayName("유저는 자신을 팔로우하는 팔로워 목록을 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user.sql"})
@Test
void test_2() throws Exception {
-
- final Long tokenUserId = getTokenUserId();
-
- List allUsers =
- userRepository.findAll().stream()
- .filter(userId -> !userId.getId().equals(tokenUserId))
- .toList();
-
- allUsers.forEach(
- u -> {
- Follow follow =
- Follow.builder()
- .userId(u.getId())
- .targetUserId(tokenUserId)
- .status(FollowStatus.FOLLOWING)
- .build();
- followRepository.save(follow);
- });
-
+ // Given
+ User me = userTestFactory.persistUser();
+ List followers = new ArrayList<>();
+ for (int i = 0; i < 5; i++) {
+ followers.add(userTestFactory.persistUser());
+ }
+ TokenItem token = getToken(me);
+
+ // 팔로워 관계 생성 (다른 유저들이 나를 팔로우)
+ for (User follower : followers) {
+ userTestFactory.persistFollow(follower, me);
+ }
+
+ // When
MvcResult result =
mockMvc
.perform(
- get("/api/v1/follow/{userId}/follower-list", tokenUserId)
+ get("/api/v1/follow/{userId}/follower-list", me.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf())
- .header("Authorization", "Bearer " + getToken()))
+ .header("Authorization", "Bearer " + token.accessToken()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists())
.andReturn();
+ // Then
String responseString = result.getResponse().getContentAsString(StandardCharsets.UTF_8);
GlobalResponse globalResponse = mapper.readValue(responseString, GlobalResponse.class);
FollowerSearchResponse followerSearchResponse =
mapper.convertValue(globalResponse.getData(), FollowerSearchResponse.class);
assertNotNull(followerSearchResponse);
- assertEquals(followerSearchResponse.totalCount(), allUsers.size());
+ assertEquals(followerSearchResponse.totalCount(), followers.size());
}
}
@@ -138,82 +135,87 @@ void test_2() throws Exception {
class myPage {
@DisplayName("로그인 유저가 타인의 마이페이지를 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user-mypage-query.sql"})
@Test
void test_1() throws Exception {
+ // Given
+ MyPageTestData data = testDataSetupHelper.setupMyPageTestData();
+ User me = data.getUser(0);
+ User targetUser = data.getUser(1);
+ TokenItem token = getToken(me);
- String accessToken = getToken();
- Long userId = 2L;
- Long requestUserId = getTokenUserId();
-
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}", userId)
+ get("/api/v1/my-page/{userId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf())
- .header("Authorization", "Bearer " + accessToken))
+ .header("Authorization", "Bearer " + token.accessToken()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists())
- .andExpect(jsonPath("$.data.userId").value(userId))
+ .andExpect(jsonPath("$.data.userId").value(targetUser.getId()))
.andReturn();
- assertNotEquals(userId, requestUserId);
+ assertNotEquals(targetUser.getId(), me.getId());
}
@DisplayName("로그인 유저가 자신의 마이페이지를 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user-mypage-query.sql"})
@Test
void test_2() throws Exception {
+ // Given
+ MyPageTestData data = testDataSetupHelper.setupMyPageTestData();
+ User me = data.getUser(0);
+ TokenItem token = getToken(me);
- String accessToken = getToken();
- Long userId = getTokenUserId();
-
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}", userId)
+ get("/api/v1/my-page/{userId}", me.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf())
- .header("Authorization", "Bearer " + accessToken))
+ .header("Authorization", "Bearer " + token.accessToken()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists())
- .andExpect(jsonPath("$.data.userId").value(userId))
+ .andExpect(jsonPath("$.data.userId").value(me.getId()))
.andExpect(jsonPath("$.data.isMyPage").value(true))
.andReturn();
}
@DisplayName("비회원 유저가 타인의 마이페이지를 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user-mypage-query.sql"})
@Test
void test_3() throws Exception {
+ // Given
+ MyPageTestData data = testDataSetupHelper.setupMyPageTestData();
+ User targetUser = data.getUser(1);
- final Long userId = 2L;
-
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}", userId)
+ get("/api/v1/my-page/{userId}", targetUser.getId())
.contentType(MediaType.APPLICATION_JSON)
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200))
.andExpect(jsonPath("$.data").exists())
- .andExpect(jsonPath("$.data.userId").value(userId))
+ .andExpect(jsonPath("$.data.userId").value(targetUser.getId()))
.andReturn();
}
@DisplayName("유저가 존재하지 않는 경우 MYPAGE_NOT_ACCESSIBLE 에러를 발생한다.")
- @Sql(scripts = {"/init-script/init-user-mypage-query.sql"})
@Test
void test_4() throws Exception {
+ // Given
Error error = Error.of(UserExceptionCode.MYPAGE_NOT_ACCESSIBLE);
- final Long userId = 999L; // 존재하지 않는 유저 ID
+ final Long nonExistentUserId = 999999L;
+
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}", userId)
+ get("/api/v1/my-page/{userId}", nonExistentUserId)
.contentType(MediaType.APPLICATION_JSON)
.with(csrf()))
.andDo(print())
@@ -229,17 +231,19 @@ void test_4() throws Exception {
class myBottle {
@DisplayName("리뷰 마이보틀을 조회할 수 있다.")
- @Sql(scripts = {"/init-script/init-user-mybottle-query.sql"})
@Test
void test_1() throws Exception {
-
- String accessToken = getToken();
- Long userId = 2L;
- Long requestUserId = getTokenUserId();
-
+ // Given
+ User me = userTestFactory.persistUser();
+ User targetUser = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ reviewTestFactory.persistReview(targetUser, alcohol);
+ TokenItem token = getToken(me);
+
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}/my-bottle/reviews", userId)
+ get("/api/v1/my-page/{userId}/my-bottle/reviews", targetUser.getId())
.param("keyword", "")
.param("regionId", "")
.param("sortType", "LATEST")
@@ -247,7 +251,7 @@ void test_1() throws Exception {
.param("cursor", "0")
.param("pageSize", "50")
.contentType(MediaType.APPLICATION_JSON)
- .header("Authorization", "Bearer " + accessToken)
+ .header("Authorization", "Bearer " + token.accessToken())
.with(csrf()))
.andDo(print())
.andExpect(status().isOk())
@@ -255,19 +259,21 @@ void test_1() throws Exception {
.andExpect(jsonPath("$.data").exists())
.andReturn();
- assertNotEquals(userId, requestUserId);
+ assertNotEquals(targetUser.getId(), me.getId());
}
@DisplayName("비회원 유저는 조회하면 BAD_REQUEST 예외를 반환한다.")
- @Sql(scripts = {"/init-script/init-user-mybottle-query.sql"})
@Test
void test_3() throws Exception {
+ // Given
+ User targetUser = userTestFactory.persistUser();
+ Alcohol alcohol = alcoholTestFactory.persistAlcohol();
+ reviewTestFactory.persistReview(targetUser, alcohol);
- final Long userId = 2L;
-
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}/my-bottle/reviews", userId)
+ get("/api/v1/my-page/{userId}/my-bottle/reviews", targetUser.getId())
.param("keyword", "")
.param("regionId", "")
.param("sortType", "LATEST")
@@ -277,19 +283,20 @@ void test_3() throws Exception {
.contentType(MediaType.APPLICATION_JSON)
.with(csrf()))
.andDo(print())
- .andExpect(status().isBadRequest()); // 비회원은 접근 불가
+ .andExpect(status().isBadRequest());
}
@DisplayName("마이보틀 유저가 존재하지 않는 경우 REQUIRED_USER_ID 예외를 반환한다.")
- @Sql(scripts = {"/init-script/init-user-mybottle-query.sql"})
@Test
void test_4() throws Exception {
+ // Given
Error error = Error.of(UserExceptionCode.REQUIRED_USER_ID);
- final Long userId = 999L; // 존재하지 않는 유저 ID
+ final Long nonExistentUserId = 999999L;
+ // When & Then
mockMvc
.perform(
- get("/api/v1/my-page/{userId}/my-bottle/reviews", userId)
+ get("/api/v1/my-page/{userId}/my-bottle/reviews", nonExistentUserId)
.param("keyword", "")
.param("regionId", "")
.param("sortType", "LATEST")
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-alcohol.sql b/bottlenote-product-api/src/test/resources/init-script/init-alcohol.sql
deleted file mode 100644
index 1e0d5d7fa..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-alcohol.sql
+++ /dev/null
@@ -1,230 +0,0 @@
-insert into regions (kor_name, eng_name, continent, description)
-values ('호주', 'Australia', null, '오세아니아에 위치한 나라로 다양한 위스키를 생산.'),
- ('핀란드', 'Finland', null, '북유럽에 위치한 나라로 청정한 자연환경을 자랑.'),
- ('프랑스', 'France', null, '와인과 브랜디로 유명한 유럽의 나라.'),
- ('타이완', 'Taiwan', null, '고품질의 위스키로 유명한 동아시아의 섬나라.'),
- ('캐나다', 'Canada', null, '위스키 생산이 활발한 북미의 나라.'),
- ('체코', 'Czech Republic', null, '중앙유럽에 위치한 나라로 맥주로도 유명.'),
- ('일본', 'Japan', null, '전통과 현대가 조화된 동아시아의 섬나라.'),
- ('인도', 'India', null, '다양한 문화와 역사를 지닌 남아시아의 나라.'),
- ('이스라엘', 'Israel', null, '중동에 위치한 나라로 와인과 위스키 생산이 증가.'),
- ('웨일즈', 'Wales', null, '영국의 구성국 중 하나로 독자적인 위스키 생산.'),
- ('영국', 'United Kingdom', null, '다양한 위스키 지역을 가진 나라.'),
- ('아일랜드', 'Ireland', null, '풍부한 전통을 지닌 위스키의 본고장 중 하나입니다.'),
- ('아이슬란드', 'Iceland', null, '청정한 자연환경과 독특한 술 문화를 가진 섬나라입니다.'),
- ('스코틀랜드/캠벨타운', 'Scotland/Campbeltown', null, '스코틀랜드의 위스키 지역 중 하나로 해안가에 위치한 반도 형태의 지역입니다.'),
- ('스코틀랜드/아일라', 'Scotland/Islay', null, '피트위스키의 대표 생산지입니다. 스모키한맛이 특징인 위스키로 유명한 섬입니다.'),
- ('스코틀랜드/스페이사이드 ', 'Scotland/Speyside', null, '스코틀랜드의 중심부에 위치하고있습니다. 더프타운에 다양한 증류소들이 있습니다.'),
- ('스코틀랜드/로우랜드', 'Scotland/Lowlands', null, '부드럽고 가벼운 맛이 특징인 위스키로 유명합니다.'),
- ('스코틀랜드/기타섬', 'Scotland/Islands', null, '다양한 섬에서 독특한 맛의 위스키를 생산하고 있습니다.'),
- ('스코틀랜드', 'Scotland/', null, '위스키의 본고장으로 다양한 스타일의 위스키를 생산합니다.'),
- ('스코트랜드/하이랜드', 'Scotland/Highlands', null, '스코틀랜드 북부 지역으로 섬세한 맛의 위스키로 유명.'),
- ('스위스', 'Switzerland', null, '알프스 산맥을 배경으로 한 유럽의 나라입니다.'),
- ('스웨덴', 'Sweden', null, '북유럽에 위치한 나라로 맥주와 위스키 생산 증가하고 있습니다.'),
- ('미국', 'United States', null, '다양한 스타일의 위스키를 생산하는 나라. 주로 켄터키의 버번위스키가 유명합니다.'),
- ('독일', 'Germany', null, '맥주로 유명한 나라로 위스키 생산도 활발합니다.'),
- ('덴마크', 'Denmark', null, '북유럽에 위치한 나라로 고유의 위스키를 생산합니다.'),
- ('네덜란드', 'Netherlands', null, '맥주와 진으로 유명한 나라로 위스키 생산도 증가하고 있습니다.');
-
-insert into distilleries (kor_name, eng_name, logo_img_url)
-values ('글래스고', 'The Glasgow Distillery Co.', null),
- ('글렌 그란트', 'Glen Grant', null),
- ('글렌 기어리', 'Glen Garioch', null),
- ('글렌 모레이', 'Glen Moray', null),
- ('글렌 스코샤', 'Glen Scotia', null),
- ('글렌 스페이', 'Glen Spey', null),
- ('글렌 엘스', 'Glen Els', null),
- ('글렌 엘진', 'Glen Elgin', null),
- ('글렌가일', 'Glengyle', null),
- ('글렌고인', 'Glengoyne', null),
- ('글렌글라쏘', 'Glenglassaugh', null),
- ('글렌달로', 'Glendalough Distillery', null),
- ('글렌드로낙', 'Glendronach', null),
- ('글렌로시', 'Glenlossie', null),
- ('글렌로티스', 'Glenrothes', null),
- ('글렌리벳', 'Glenlivet', null),
- ('글렌모렌지', 'Glenmorangie', null),
- ('글렌알라키', 'Glenallachie', null),
- ('글렌카담', 'Glencadam', null),
- ('글렌킨치', 'Glenkinchie', null),
- ('글렌터렛', 'Glenturret', null),
- ('글렌파클라스', 'Glenfarclas', null),
- ('글렌피딕', 'Glenfiddich', null),
- ('글리나', 'Glina Destillerie', null),
- ('녹듀', 'Knockdhu', null),
- ('뉴 리브 티스틸링', 'New Riff Distilling', null),
- ('뉴 리프 디스틸링', 'New Riff Distilling', null),
- ('달루인', 'Dailuaine', null),
- ('달모어', 'Dalmore', null),
- ('달위니', 'Dalwhinnie', null),
- ('더프타운', 'Dufftown', null),
- ('딘스톤', 'Deanston', null),
- ('딩글', 'The Dingle Whiskey Distillery', null),
- ('라가불린', 'Lagavulin', null),
- ('라세이', 'Raasay Distillery', null),
- ('라프로익', 'Laphroaig', null),
- ('로얄 로크나가', 'Royal Lochnagar', null),
- ('로얄 브라클라', 'Royal Brackla', null),
- ('로크몬드', 'Loch Lomond', null),
- ('루겐브로이', 'Rugenbräu', null),
- ('링크우드', 'Linkwood', null),
- ('마르스 신슈', 'The Mars Shinshu Distillery', null),
- ('맥더프', 'Macduff', null),
- ('맥미라', 'Mackmyra', null),
- ('맥캘란', 'Macallan', null),
- ('메이커스마크', 'Maker''s Mark Distillery, Inc.', null),
- ('미들턴', 'Midleton (1975-)', null),
- ('미야기쿄', 'Miyagikyo', null),
- ('믹터스', 'Michter''s Distillery', null),
- ('밀크 앤 허니', 'Milk & Honey Whisky Distillery', null),
- ('밀톤더프', 'Miltonduff', null),
- ('바렐 크래프트 스피릿', 'Barrell Craft Spirits', null),
- ('발베니', 'Balvenie', null),
- ('발블레어', 'Balblair', null),
- ('발코네스', 'Balcones Distilling', null),
- ('버팔로 트레이스', 'Buffalo Trace Distillery', null),
- ('베르그슬라겐스', 'Bergslagens Destilleri', null),
- ('벤 네비스', 'Ben Nevis', null),
- ('벤로막', 'Benromach', null),
- ('벤리네스', 'Benrinnes', null),
- ('벤리악', 'BenRiach', null),
- ('보모어', 'Bowmore', null),
- ('부나하벤', 'Bunnahabhain', null),
- ('부시밀', 'Bushmills', null),
- ('브라우레이 로커', 'Brauerei Locher', null),
- ('브라운 포 맨', 'Brown-Forman Distillery', null),
- ('브라운슈타인', 'Braunstein', null),
- ('브룩라디', 'Bruichladdich', null),
- ('블라드녹', 'Bladnoch', null),
- ('블레어 아톨', 'Blair Athol', null),
- ('설리반 코브', 'Sullivans Cove', null),
- ('세인트 킬리안', 'St. Kilian Distillers', null),
- ('스뫼겐', 'Smögen', null),
- ('스무스 앰블러 스피릿', 'Smooth Ambler Spirits', null),
- ('스카파', 'Scapa', null),
- ('스타워드', 'Starward', null),
- ('스터닝', 'Stauning Whisky', null),
- ('스트라스밀', 'Strathmill', null),
- ('스트라티슬라', 'Strathisla', null),
- ('스페이번', 'Speyburn', null),
- ('스페이사이드', 'Speyside Distillery', null),
- ('스프링뱅크', 'Springbank', null),
- ('실리스', 'Slyrs', null),
- ('아드나머칸', 'Ardnamurchan', null),
- ('아드모어', 'Ardmore', null),
- ('아드벡', 'Ardbeg', null),
- ('아란', 'Arran', null),
- ('아벨라워', 'Aberlour', null),
- ('아사카', 'Asaka', null),
- ('암룻', 'Amrut', null),
- ('애버펠디', 'Aberfeldy', null),
- ('야마자키', 'Yamazaki', null),
- ('에드라두르', 'Edradour', null),
- ('에드라두어', 'Edradour', null),
- ('에이가시마 슈조', 'Eigashima Shuzo', null),
- ('오반', 'Oban', null),
- ('오켄토션', 'Auchentoshan', null),
- ('와렝햄', 'Warenghem', null),
- ('와일드 터키', 'Wild Turkey Distillery', null),
- ('요이치', 'Yoichi', null),
- ('우드포드 리저브', 'Woodford Reserve', null),
- ('울트모어', 'Aultmore', null),
- ('울프번', 'Wolfburn', null),
- ('월렛', 'Willett Distillery', null),
- ('웨스트랜드', 'Westland Distillery', null),
- ('위도우 제인', 'Widow Jane Distillery', null),
- ('잭다니엘', 'Jack Daniel''s', null),
- ('존', 'John Distilleries', null),
- ('주라', 'Isle of Jura', null),
- ('쥐담', 'Zuidam Distillery', null),
- ('짐 빔', 'Jim Beam', null),
- ('츠누키', 'Tsunuki', null),
- ('치치부', 'Chichibu', null),
- ('카듀', 'Cardhu', null),
- ('카발란', 'Kavalan', null),
- ('카퍼도니히', 'Caperdonich', null),
- ('쿨레이', 'Cooley', null),
- ('쿨리', 'Cooley', null),
- ('쿨일라', 'Caol Ila', null),
- ('크라겐모어', 'Cragganmore', null),
- ('크라이겔라키', 'Craigellachie', null),
- ('크라이넬리쉬', 'Clynelish', null),
- ('클레이', 'Cley Distillery', null),
- ('클로나킬티', 'Clonakilty Distillery', null),
- ('킬호만', 'Kilchoman', null),
- ('탈라모어 듀', 'Tullamore Dew (2014 - present)', null),
- ('탈리스커', 'Talisker', null),
- ('탐나불린', 'Tamnavulin', null),
- ('탐듀', 'Tamdhu', null),
- ('터틸타운 스피리츠', 'Tuthilltown Spirits', null),
- ('테렌펠리', 'Teerenpeli', null),
- ('토마틴', 'Tomatin', null),
- ('토모어', 'Tormore', null),
- ('토민타울', 'Tomintoul', null),
- ('토버모리', 'Tobermory', null),
- ('툴리바딘', 'Tullibardine', null),
- ('티니닉', 'Teaninich', null),
- ('틸링', 'Teeling Whiskey Distillery', null),
- ('페터케른', 'Fettercairn', null),
- ('펜데린', 'Penderyn Distillery', null),
- ('포 로지스', 'Four Roses Distillery', null),
- ('풀티니', 'Pulteney', null),
- ('하이 코스트', 'High Coast Distillery', null),
- ('하이랜드 파크', 'Highland Park', null),
- ('하쿠슈', 'Hakushu', null),
- ('헤븐힐', 'Heaven Hill Distilleries, Inc.', null),
- ('후지 코텐바', 'Fuji Gotemba', null),
- ('휘슬피그', 'WhistlePig', null),
- ('휘슬피거', 'WhistlePager', null),
- ('ETC', 'ETC', null);
-
-insert into alcohols (kor_name, eng_name, abv, type, kor_category, eng_category, category_group, region_id,
- distillery_id, age, cask, image_url)
-values ('라이터스 티얼즈 레드 헤드', 'Writers'' Tears Red Head', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 150,
- null, 'Oloroso Sherry Butts', 'https://static.whiskybase.com/storage/whiskies/1/8/3881/318643-big.jpg'),
- ('라이터스 티얼즈 더블 오크', 'Writers'' Tears Double Oak', '46', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'American & French Oak', 'https://static.whiskybase.com/storage/whiskies/1/3/1308/282645-big.jpg'),
- ('라이터스 티얼즈 코퍼 팟', 'Writers'' Tears Copper Pot', '40', 'WHISKY', '블렌디드 몰트', 'Blended Malt', 'BLENDED_MALT', 12,
- 150, null, 'Bourbon Barrels', 'https://static.whiskybase.com/storage/whiskies/7/7/471/189958-big.jpg'),
- ('VAT 69 블렌디드 스카치 위스키', 'VAT 69 Blended Scotch Whisky', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 16, 150, null,
- null, 'https://static.whiskybase.com/storage/whiskies/8/1/189/246095-big.jpg'),
- ('툴리바딘 소버린', 'Tullibardine Sovereign', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 137, null,
- '1st fill bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/7/4450/390659-big.jpg'),
- ('탈라모어 듀 XO', 'Tullamore Dew XO', '43', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 127, null,
- 'Caribbean Rum Cask Finish', 'https://static.whiskybase.com/storage/whiskies/1/0/9073/192995-big.jpg'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg'),
- ('탈라모어 듀 사이다 캐스크 피니시', 'Tullamore Dew Cider Cask Finish', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'Cider Cask Finish', 'https://static.whiskybase.com/storage/whiskies/6/9/408/192993-big.jpg'),
- ('탈라모어 듀 14년', 'Tullamore Dew 14y', '41.3', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 47, '14',
- 'Bourbon, Oloroso Sherry, Port, Madeira Finish',
- 'https://static.whiskybase.com/storage/whiskies/7/8/743/201942-big.jpg'),
- ('탈라모어 듀 12년', 'Tullamore Dew 12y', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, '12',
- 'Ex-Bourbon & Oloroso Sherry Casks', 'https://static.whiskybase.com/storage/whiskies/8/1/442/229572-big.jpg'),
- ('토모어 16년', 'Tormore 16y', '48', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '16',
- 'American Oak Cask', 'https://static.whiskybase.com/storage/whiskies/2/0/0044/349731-big.jpg'),
- ('토모어 14년', 'Tormore 14y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '14', 'American Oak',
- 'https://static.whiskybase.com/storage/whiskies/4/6/006/87125-big.jpg'),
- ('토민타울 피티탱', 'Tomintoul With A Peaty Tang', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- null, 'https://static.whiskybase.com/storage/whiskies/1/2/2408/373021-big.jpg'),
- ('토민타울 시가몰트', 'Tomintoul Cigar Malt', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- 'Oloroso', 'https://static.whiskybase.com/storage/whiskies/1/6/7902/372433-big.jpg'),
- ('토민타울 16년', 'Tomintoul 16y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '16', null,
- 'https://static.whiskybase.com/storage/whiskies/6/7/387/106575-big.jpg'),
- ('토민타울 14년', 'Tomintoul 14y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '14',
- 'American oak ex-bourbon', 'https://static.whiskybase.com/storage/whiskies/2/0/0756/133825-big.jpg'),
- ('토민타울 10년', 'Tomintoul 10y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '10',
- 'American oak ex-bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/2/2573/205398-big.jpg'),
- ('아벨라워 18년', 'Aberlour 18y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 89, '18',
- 'Am. & Eur. Oak + 1st-Fill PX & Oloroso Finish',
- 'https://static.whiskybase.com/storage/whiskies/2/3/7131/424101-big.jpg'),
- ('포트 샬롯 10년', 'Port Charlotte 10y', '50', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 15, 69, '10', null,
- 'https://static.whiskybase.com/storage/whiskies/1/1/2320/201819-big.jpg'),
- ('카듀 엠버 록', 'Cardhu Amber Rock', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 115, null,
- 'Bourbon Cask', 'https://static.whiskybase.com/storage/whiskies/5/4/607/343007-big.jpg'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg'),
- ('아드나머칸 AD', 'Ardnamurchan AD/', '46.8', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 85, null,
- 'Bourbon & Sherry', 'https://static.whiskybase.com/storage/whiskies/2/2/5270/415209-big.jpg'),
- ('울프번 10년', 'Wolfburn 10y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 104, '10',
- 'Oloroso Sherry Hogsheads', 'https://static.whiskybase.com/storage/whiskies/2/3/0518/412215-big.jpg');
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-help.sql b/bottlenote-product-api/src/test/resources/init-script/init-help.sql
deleted file mode 100644
index f5b0760e0..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-help.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-INSERT INTO helps (user_id, type, help_title, help_content, status, admin_id, response_content, create_at, create_by,
- last_modify_at, last_modify_by)
-VALUES (2, 'USER', '탈퇴관련문의', '탈퇴가 안돼요', 'WAITING', NULL, NULL, NULL, NULL, NULL, NULL);
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-popular_alcohol.sql b/bottlenote-product-api/src/test/resources/init-script/init-popular_alcohol.sql
deleted file mode 100644
index 7caeeb0a8..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-popular_alcohol.sql
+++ /dev/null
@@ -1,27 +0,0 @@
-insert into popular_alcohols (alcohol_id, year, month, day, review_score, rating_score, pick_score, popular_score)
-values (1, 2024, 10, 9, 0.15, 0.43, 1.00, 0.49),
- (1, 2024, 10, 17, 0.12, 0.42, 1.00, 0.48),
- (274, 2024, 10, 17, 0.01, 0.91, 0.33, 0.38),
- (2, 2024, 10, 17, 0.04, 0.77, 0.17, 0.29),
- (6, 2024, 10, 17, 0.00, 0.76, 0.17, 0.28),
- (124, 2024, 10, 17, 0.14, 0.72, 0.00, 0.27),
- (135, 2024, 10, 17, 0.02, 0.60, 0.17, 0.24),
- (179, 2024, 10, 17, 0.03, 0.73, 0.00, 0.23),
- (232, 2024, 10, 17, 0.01, 0.59, 0.00, 0.18),
- (5, 2024, 10, 17, 0.04, 0.38, 0.17, 0.18),
- (435, 2024, 10, 17, 0.03, 0.48, 0.00, 0.15),
- (33, 2024, 10, 17, 0.00, 0.00, 0.33, 0.10),
- (42, 2024, 10, 17, 0.04, 0.00, 0.17, 0.07),
- (559, 2024, 10, 17, 0.04, 0.00, 0.17, 0.06),
- (434, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (462, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (64, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (566, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (485, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (421, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (382, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (289, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (314, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (433, 2024, 10, 17, 0.00, 0.00, 0.17, 0.05),
- (43, 2024, 10, 17, 0.09, 0.00, 0.00, 0.04),
- (123, 2024, 10, 17, 0.07, 0.00, 0.00, 0.03);
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-review-reply.sql b/bottlenote-product-api/src/test/resources/init-script/init-review-reply.sql
deleted file mode 100644
index bf34fb7f1..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-review-reply.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-insert into review_replies (review_id, user_id, root_reply_id, parent_reply_id, content, create_at, create_by,
- last_modify_at, last_modify_by)
-values (4, 3, null, null, '1️⃣ Root 댓글', '2024-06-27 23:16:16', null, '2024-06-27 23:16:16', null),
- (4, 3, null, null, '2️⃣2️⃣ Root 댓글', '2024-06-27 23:16:16', null, '2024-06-27 23:16:16', null),
- (4, 3, 1, 1, '👍👍👍👍', '2024-06-27 23:16:23', null, '2024-06-27 23:16:23', null),
- (4, 3, 1, 3, '👍👍👍👍', '2024-06-27 23:16:39', null, '2024-06-27 23:16:39', null),
- (4, 3, 1, 3, '👍👍👍👍', '2024-06-27 23:16:43', null, '2024-06-27 23:16:43', null),
- (4, 3, 1, 4, '👍👍👍👍', '2024-06-28 02:55:46', null, '2024-06-28 02:55:46', null),
- (4, 3, 1, 4, '🌿🌿🌿🌿🌿', '2024-06-28 02:55:46', null, '2024-06-28 02:55:46', null);
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-review.sql b/bottlenote-product-api/src/test/resources/init-script/init-review.sql
deleted file mode 100644
index 4c7a7d318..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-review.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-INSERT INTO reviews
-(user_id, alcohol_id, is_best, content, size_type, price, location_name, zip_code, address,
- detail_address, category, map_url, latitude, longitude, status,
- image_url, view_count, active_status, create_at, create_by, last_modify_at, last_modify_by)
-VALUES (1, 1, true, '이 위스키는 풍부하고 복잡한 맛이 매력적입니다.', 'BOTTLE', 65000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map1', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image01.jpg', NULL, 'ACTIVE', '2024-05-05 12:00:00', NULL,
- NULL, NULL),
- (1, 1, false, '가벼우면서도 깊은 맛이 느껴지는 위스키입니다.', 'GLASS', 45000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map2', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image02.jpg', NULL, 'ACTIVE', '2024-05-02 13:00:00', NULL,
- NULL, NULL),
- (1, 1, false, '향기로운 바닐라 향이 나는 부드러운 위스키입니다.', 'BOTTLE', 77000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map3', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image03.jpg', NULL, 'ACTIVE', '2024-05-16 14:30:00', NULL,
- NULL, NULL),
- (2, 4, false, '스모키하고 강한 페트 향이 인상적인 위스키입니다.', 'BOTTLE', 120000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map4', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image04.jpg', NULL, 'ACTIVE', '2024-05-01 15:45:00', NULL,
- NULL, NULL),
- (2, 2, false, '달콤한 캐러멜과 과일 향이 조화를 이루는 맛있습니다.', 'GLASS', 99000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map5', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image05.jpg', NULL, 'ACTIVE', '2024-05-08 16:00:00', NULL,
- NULL, NULL),
- (4, 1, false, '약간의 훈연향이 입안에 오래 남습니다.', 'GLASS', 52000, 'yyPub', '06001',
- '서울시 강남구 역삼동', 'yyPub 역삼점', 'bar', 'https://maps.example.com/map9', '12.124', '12.124',
- 'PUBLIC', 'https://example.com/image09.jpg', NULL, 'ACTIVE', '2024-05-10 21:00:00', NULL,
- NULL, NULL),
- (5, 1, true, '고급스러운 피트향과 묵직한 바디감이 만족스럽습니다.', 'BOTTLE', 99000, 'yyPub', '06001',
- '서울시 강남구 역삼동', 'yyPub 역삼점', 'bar', 'https://maps.example.com/map10', '12.124', '12.124',
- 'PUBLIC', 'https://example.com/image10.jpg', NULL, 'ACTIVE', '2024-05-11 22:00:00', NULL,
- NULL, NULL),
- (6, 1, false, '산뜻한 감귤 향이 느껴지는 독특한 위스키입니다.', 'GLASS', 46000, 'yyPub', '06001',
- '서울시 강남구 역삼동', 'yyPub 역삼점', 'bar', 'https://maps.example.com/map11', '12.124', '12.124',
- 'PUBLIC', 'https://example.com/image11.jpg', NULL, 'ACTIVE', '2024-05-12 23:00:00', NULL,
- NULL, NULL),
- (7, 1, false, '캐러멜과 초콜릿 향이 잘 어우러지는 부드러운 위스키입니다.', 'BOTTLE', 78000, 'yyPub', '06001',
- '서울시 강남구 역삼동', 'yyPub 역삼점', 'bar', 'https://maps.example.com/map12', '12.124', '12.124',
- 'PUBLIC', 'https://example.com/image12.jpg', NULL, 'ACTIVE', '2024-05-13 23:30:00', NULL,
- NULL, NULL);
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-user-history.sql b/bottlenote-product-api/src/test/resources/init-script/init-user-history.sql
deleted file mode 100644
index b180bcc83..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-user-history.sql
+++ /dev/null
@@ -1,507 +0,0 @@
-insert into users (email, nick_name, age, image_url, gender, role, status, social_type,
- refresh_token, create_at,
- last_modify_at)
-values ('hyejj19@naver.com', 'WOzU6J8541', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
-]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoeWVqajE5QG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoxLCJpYXQiOjE3MTkwNDA2ODAsImV4cCI6MTcyMDI1MDI4MH0._s1r4Je9wFTvu_hV0sYBVRr5uDqiHXVBM22jS35YNbH0z-svrTYjysORA4J2J5GQcel9K5FxRBQnWjAeqQNfdw',
- NULL, NULL),
- ('chadongmin@naver.com', 'xIFo6J8726', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJjaGFkb25nbWluQG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoyLCJpYXQiOjE3MjA3MDE2NjcsImV4cCI6MTcyMTkxMTI2N30.dNGvbasf2gccc4TImO2pGg7wIZi_VPNupGYmIRYqutRKrXq79ep0J-sE1OMpk7GC4y3nFkiqvwSWznHggrmRFA',
- NULL, NULL),
- ('dev.bottle-note@gmail.com', 'PARC6J8814', 25, NULL, 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJkZXYuYm90dGxlLW5vdGVAZ21haWwuY29tIiwicm9sZXMiOiJST0xFX1VTRVIiLCJ1c2VySWQiOjMsImlhdCI6MTcyMDM1MDY4OCwiZXhwIjoxNzIxNTYwMjg4fQ.two8yLXv2xFCEOhuGrLYV8cmewm8bD8EbIWTXYa896MprhgclsGNDThspjRF9VJmSA3mxvoPjnBJ0ClneCClBQ',
- NULL, NULL),
- ('eva.park@oysterable.com', 'VOKs6J8831', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJldmEucGFya0BveXN0ZXJhYmxlLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo1LCJpYXQiOjE3MTc4MzU1MDUsImV4cCI6MTcxOTA0NTEwNX0.j6u6u8a8lhedeegOe2wqOjNZkMx0X3RgVeAcvnlCZmj_AXQF5WDo4k71WI-bFt_ypW-ewVCRmdLQoOduaggCRw',
- NULL, NULL),
- ('rlagusrl928@gmail.com', 'hpPw6J111837', NULL, NULL, 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJybGFndXNybDkyOEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NiwiaWF0IjoxNzE4MDk4NjQxLCJleHAiOjE3MTkzMDgyNDF9.0nfUYMm4UEFzfE52ydulDZ0eX5U_2yBN4hCeBXr4PeA3xwbzDo7t2c2kJGNU_LXMbZg2Iz4DAIZnu0QB3DJ8VA',
- NULL, NULL),
- ('ytest@gmail.com', 'OMkS6J12123', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '[
- "GOOGLE"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ5dGVzdEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NywiaWF0IjoxNzE4MTIzMDMxLCJleHAiOjE3MTkzMzI2MzF9.8KNJW6havezUSgaWmRyAvlxfwdRZxjdC7mcBuexN0Gy9NtgJIAVWqNMW0wlJXw7d9LVwtZf5Mv4aUdA_V-V8pw',
- NULL, NULL),
- ('juye@gmail.com', 'juye12', NULL, 'http://example.com/new-profile-image.jpg', NULL,
- 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqdXllQGdtYWlsLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo4LCJpYXQiOjE3MjA2OTg0MDcsImV4cCI6MTcyMTkwODAwN30.VaTNqvK-e8g9zsaOhoEmrKQKATCKtKqSIvuOCKpB0lS5L2I7Xd-iVhkwuVHfySalK0y_t_hf9CsIfeIjWgO0gw',
- NULL, NULL),
- ('rkdtkfma@naver.com', 'iZBq6J22547', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
- ]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJya2R0a2ZtYUBuYXZlci5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6OSwiaWF0IjoxNzIwNzAzMjExLCJleHAiOjE3MjE5MTI4MTF9.pD-MCIPRxbYBLJ2ZPei_529YCop_a8yVKPCsz-YYlvCjyAM40aVQRPv2rDg2wfCZAr5c3NKyS210LwQXwxf1OQ',
- NULL, NULL);
-
-insert into regions (kor_name, eng_name, continent, description, create_at, create_by,
- last_modify_at, last_modify_by)
-values ('호주', 'Australia', null, '오세아니아에 위치한 나라로 다양한 위스키를 생산.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('핀란드', 'Finland', null, '북유럽에 위치한 나라로 청정한 자연환경을 자랑.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('프랑스', 'France', null, '와인과 브랜디로 유명한 유럽의 나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('타이완', 'Taiwan', null, '고품질의 위스키로 유명한 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('캐나다', 'Canada', null, '위스키 생산이 활발한 북미의 나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('체코', 'Czech Republic', null, '중앙유럽에 위치한 나라로 맥주로도 유명.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('일본', 'Japan', null, '전통과 현대가 조화된 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('인도', 'India', null, '다양한 문화와 역사를 지닌 남아시아의 나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('이스라엘', 'Israel', null, '중동에 위치한 나라로 와인과 위스키 생산이 증가.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('웨일즈', 'Wales', null, '영국의 구성국 중 하나로 독자적인 위스키 생산.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('영국', 'United Kingdom', null, '다양한 위스키 지역을 가진 나라.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('아일랜드', 'Ireland', null, '풍부한 전통을 지닌 위스키의 본고장 중 하나입니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('아이슬란드', 'Iceland', null, '청정한 자연환경과 독특한 술 문화를 가진 섬나라입니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/캠벨타운', 'Scotland/Campbeltown', null, '스코틀랜드의 위스키 지역 중 하나로 해안가에 위치한 반도 형태의 지역입니다.',
- '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/아일라', 'Scotland/Islay', null, '피트위스키의 대표 생산지입니다. 스모키한맛이 특징인 위스키로 유명한 섬입니다.',
- '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/스페이사이드 ', 'Scotland/Speyside', null, '스코틀랜드의 중심부에 위치하고있습니다. 더프타운에 다양한 증류소들이 있습니다.',
- '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/로우랜드', 'Scotland/Lowlands', null, '부드럽고 가벼운 맛이 특징인 위스키로 유명합니다.',
- '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/기타섬', 'Scotland/Islands', null, '다양한 섬에서 독특한 맛의 위스키를 생산하고 있습니다.',
- '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드', 'Scotland/', null, '위스키의 본고장으로 다양한 스타일의 위스키를 생산합니다.', '2024-06-04 17:19:39',
- 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코트랜드/하이랜드', 'Scotland/Highlands', null, '스코틀랜드 북부 지역으로 섬세한 맛의 위스키로 유명.',
- '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스위스', 'Switzerland', null, '알프스 산맥을 배경으로 한 유럽의 나라입니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('스웨덴', 'Sweden', null, '북유럽에 위치한 나라로 맥주와 위스키 생산 증가하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('미국', 'United States', null, '다양한 스타일의 위스키를 생산하는 나라. 주로 켄터키의 버번위스키가 유명합니다.',
- '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('독일', 'Germany', null, '맥주로 유명한 나라로 위스키 생산도 활발합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('덴마크', 'Denmark', null, '북유럽에 위치한 나라로 고유의 위스키를 생산합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39',
- 'admin'),
- ('네덜란드', 'Netherlands', null, '맥주와 진으로 유명한 나라로 위스키 생산도 증가하고 있습니다.', '2024-06-04 17:19:39',
- 'admin',
- '2024-06-04 17:19:39', 'admin');
-
-insert into distilleries (kor_name, eng_name, logo_img_url, create_at, create_by, last_modify_at,
- last_modify_by)
-values ('글래스고', 'The Glasgow Distillery Co.', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('글렌 그란트', 'Glen Grant', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌 기어리', 'Glen Garioch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌 모레이', 'Glen Moray', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌 스코샤', 'Glen Scotia', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌 스페이', 'Glen Spey', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌 엘스', 'Glen Els', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 엘진', 'Glen Elgin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌가일', 'Glengyle', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌고인', 'Glengoyne', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌글라쏘', 'Glenglassaugh', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌달로', 'Glendalough Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('글렌드로낙', 'Glendronach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌로시', 'Glenlossie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌로티스', 'Glenrothes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌리벳', 'Glenlivet', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌모렌지', 'Glenmorangie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌알라키', 'Glenallachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌카담', 'Glencadam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌킨치', 'Glenkinchie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌터렛', 'Glenturret', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌파클라스', 'Glenfarclas', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글렌피딕', 'Glenfiddich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('글리나', 'Glina Destillerie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('녹듀', 'Knockdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('뉴 리브 티스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('뉴 리프 디스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('달루인', 'Dailuaine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달모어', 'Dalmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달위니', 'Dalwhinnie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('더프타운', 'Dufftown', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딘스톤', 'Deanston', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딩글', 'The Dingle Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('라가불린', 'Lagavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라세이', 'Raasay Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('라프로익', 'Laphroaig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로얄 로크나가', 'Royal Lochnagar', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('로얄 브라클라', 'Royal Brackla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('로크몬드', 'Loch Lomond', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('루겐브로이', 'Rugenbräu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('링크우드', 'Linkwood', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('마르스 신슈', 'The Mars Shinshu Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('맥더프', 'Macduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥미라', 'Mackmyra', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥캘란', 'Macallan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('메이커스마크', 'Maker''s Mark Distillery, Inc.', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03',
- 'admin'),
- ('미들턴', 'Midleton (1975-)', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('미야기쿄', 'Miyagikyo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('믹터스', 'Michter''s Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('밀크 앤 허니', 'Milk & Honey Whisky Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03',
- 'admin'),
- ('밀톤더프', 'Miltonduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('바렐 크래프트 스피릿', 'Barrell Craft Spirits', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('발베니', 'Balvenie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발블레어', 'Balblair', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발코네스', 'Balcones Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('버팔로 트레이스', 'Buffalo Trace Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('베르그슬라겐스', 'Bergslagens Destilleri', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('벤 네비스', 'Ben Nevis', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤로막', 'Benromach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리네스', 'Benrinnes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리악', 'BenRiach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('보모어', 'Bowmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('부나하벤', 'Bunnahabhain', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('부시밀', 'Bushmills', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라우레이 로커', 'Brauerei Locher', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('브라운 포 맨', 'Brown-Forman Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('브라운슈타인', 'Braunstein', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('브룩라디', 'Bruichladdich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('블라드녹', 'Bladnoch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('블레어 아톨', 'Blair Athol', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('설리반 코브', 'Sullivans Cove', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('세인트 킬리안', 'St. Kilian Distillers', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('스뫼겐', 'Smögen', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스무스 앰블러 스피릿', 'Smooth Ambler Spirits', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('스카파', 'Scapa', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스타워드', 'Starward', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스터닝', 'Stauning Whisky', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('스트라스밀', 'Strathmill', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('스트라티슬라', 'Strathisla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('스페이번', 'Speyburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스페이사이드', 'Speyside Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('스프링뱅크', 'Springbank', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('실리스', 'Slyrs', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드나머칸', 'Ardnamurchan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('아드모어', 'Ardmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드벡', 'Ardbeg', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아란', 'Arran', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아벨라워', 'Aberlour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아사카', 'Asaka', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('암룻', 'Amrut', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('애버펠디', 'Aberfeldy', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('야마자키', 'Yamazaki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두르', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두어', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에이가시마 슈조', 'Eigashima Shuzo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('오반', 'Oban', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('오켄토션', 'Auchentoshan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('와렝햄', 'Warenghem', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('와일드 터키', 'Wild Turkey Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('요이치', 'Yoichi', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('우드포드 리저브', 'Woodford Reserve', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('울트모어', 'Aultmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('울프번', 'Wolfburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('월렛', 'Willett Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('웨스트랜드', 'Westland Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('위도우 제인', 'Widow Jane Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('잭다니엘', 'Jack Daniel''s', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('존', 'John Distilleries', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('주라', 'Isle of Jura', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쥐담', 'Zuidam Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('짐 빔', 'Jim Beam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('츠누키', 'Tsunuki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('치치부', 'Chichibu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카듀', 'Cardhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카발란', 'Kavalan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카퍼도니히', 'Caperdonich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('쿨레이', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨리', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨일라', 'Caol Ila', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라겐모어', 'Cragganmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('크라이겔라키', 'Craigellachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('크라이넬리쉬', 'Clynelish', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('클레이', 'Cley Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('클로나킬티', 'Clonakilty Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('킬호만', 'Kilchoman', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탈라모어 듀', 'Tullamore Dew (2014 - present)', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03',
- 'admin'),
- ('탈리스커', 'Talisker', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐나불린', 'Tamnavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐듀', 'Tamdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('터틸타운 스피리츠', 'Tuthilltown Spirits', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('테렌펠리', 'Teerenpeli', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토마틴', 'Tomatin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토모어', 'Tormore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토민타울', 'Tomintoul', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토버모리', 'Tobermory', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('툴리바딘', 'Tullibardine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('티니닉', 'Teaninich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('틸링', 'Teeling Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('페터케른', 'Fettercairn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('펜데린', 'Penderyn Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('포 로지스', 'Four Roses Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('풀티니', 'Pulteney', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하이 코스트', 'High Coast Distillery', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('하이랜드 파크', 'Highland Park', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('하쿠슈', 'Hakushu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('헤븐힐', 'Heaven Hill Distilleries, Inc.', null, '2024-06-04 17:09:03', 'admin',
- '2024-06-04 17:09:03', 'admin'),
- ('후지 코텐바', 'Fuji Gotemba', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('휘슬피그', 'WhistlePig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('휘슬피거', 'WhistlePager', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('ETC', 'ETC', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin');
-
-insert into alcohols (kor_name, eng_name, abv, type, kor_category, eng_category, category_group,
- region_id,
- distillery_id, age, cask, image_url, create_at, create_by, last_modify_at,
- last_modify_by)
-values ('라이터스 티얼즈 레드 헤드', 'Writers'' Tears Red Head', '46', 'WHISKY', '싱글 몰트', 'Single Malt',
- 'SINGLE_MALT', 12, 150,
- null, 'Oloroso Sherry Butts',
- 'https://static.whiskybase.com/storage/whiskies/1/8/3881/318643-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 더블 오크', 'Writers'' Tears Double Oak', '46', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null,
- 'American & French Oak',
- 'https://static.whiskybase.com/storage/whiskies/1/3/1308/282645-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 코퍼 팟', 'Writers'' Tears Copper Pot', '40', 'WHISKY', '블렌디드 몰트', 'Blended Malt',
- 'BLENDED_MALT', 12,
- 150, null, 'Bourbon Barrels',
- 'https://static.whiskybase.com/storage/whiskies/7/7/471/189958-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('VAT 69 블렌디드 스카치 위스키', 'VAT 69 Blended Scotch Whisky', '40', 'WHISKY', '블렌디드', 'Blend',
- 'BLEND', 16, 150, null,
- null, 'https://static.whiskybase.com/storage/whiskies/8/1/189/246095-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('툴리바딘 소버린', 'Tullibardine Sovereign', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT',
- 20, 137, null,
- '1st fill bourbon barrel',
- 'https://static.whiskybase.com/storage/whiskies/1/7/4450/390659-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 XO', 'Tullamore Dew XO', '43', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 127, null,
- 'Caribbean Rum Cask Finish',
- 'https://static.whiskybase.com/storage/whiskies/1/0/9073/192995-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY',
- '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 사이다 캐스크 피니시', 'Tullamore Dew Cider Cask Finish', '40', 'WHISKY', '블렌디드', 'Blend',
- 'BLEND', 12, 47, null,
- 'Cider Cask Finish',
- 'https://static.whiskybase.com/storage/whiskies/6/9/408/192993-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 14년', 'Tullamore Dew 14y', '41.3', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT',
- 12, 47, '14',
- 'Bourbon, Oloroso Sherry, Port, Madeira Finish',
- 'https://static.whiskybase.com/storage/whiskies/7/8/743/201942-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 12년', 'Tullamore Dew 12y', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, '12',
- 'Ex-Bourbon & Oloroso Sherry Casks',
- 'https://static.whiskybase.com/storage/whiskies/8/1/442/229572-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 16년', 'Tormore 16y', '48', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134,
- '16',
- 'American Oak Cask',
- 'https://static.whiskybase.com/storage/whiskies/2/0/0044/349731-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 14년', 'Tormore 14y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134,
- '14', 'American Oak',
- 'https://static.whiskybase.com/storage/whiskies/4/6/006/87125-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 피티탱', 'Tomintoul With A Peaty Tang', '40', 'WHISKY', '싱글 몰트', 'Single Malt',
- 'SINGLE_MALT', 16, 135, null,
- null, 'https://static.whiskybase.com/storage/whiskies/1/2/2408/373021-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 시가몰트', 'Tomintoul Cigar Malt', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT',
- 16, 135, null,
- 'Oloroso', 'https://static.whiskybase.com/storage/whiskies/1/6/7902/372433-big.jpg',
- '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 16년', 'Tomintoul 16y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135,
- '16', null,
- 'https://static.whiskybase.com/storage/whiskies/6/7/387/106575-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 14년', 'Tomintoul 14y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135,
- '14',
- 'American oak ex-bourbon',
- 'https://static.whiskybase.com/storage/whiskies/2/0/0756/133825-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 10년', 'Tomintoul 10y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135,
- '10',
- 'American oak ex-bourbon barrel',
- 'https://static.whiskybase.com/storage/whiskies/1/2/2573/205398-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아벨라워 18년', 'Aberlour 18y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 89,
- '18',
- 'Am. & Eur. Oak + 1st-Fill PX & Oloroso Finish',
- 'https://static.whiskybase.com/storage/whiskies/2/3/7131/424101-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('포트 샬롯 10년', 'Port Charlotte 10y', '50', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT',
- 15, 69, '10', null,
- 'https://static.whiskybase.com/storage/whiskies/1/1/2320/201819-big.jpg',
- '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('카듀 엠버 록', 'Cardhu Amber Rock', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16,
- 115, null,
- 'Bourbon Cask', 'https://static.whiskybase.com/storage/whiskies/5/4/607/343007-big.jpg',
- '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY',
- '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아드나머칸 AD', 'Ardnamurchan AD/', '46.8', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20,
- 85, null,
- 'Bourbon & Sherry',
- 'https://static.whiskybase.com/storage/whiskies/2/2/5270/415209-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('울프번 10년', 'Wolfburn 10y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 104,
- '10',
- 'Oloroso Sherry Hogsheads',
- 'https://static.whiskybase.com/storage/whiskies/2/3/0518/412215-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin');
-
-INSERT INTO user_histories (id, user_id, event_category, event_type, redirect_url, image_url, alcohol_id,
- content, dynamic_message, event_year,
- event_month,
- create_at, create_by, last_modify_at, last_modify_by)
-VALUES (1, 1, 'RATING', 'START_RATING', 'api/v1/rating',
- 'https://static.whiskybase.com/storage/whiskies/2/0/8916/404538-big.jpg', 1,
- null, null, '2025', '01',
- '2025-01-01 19:50:26', 'chadongmin@example.com', '2025-01-20 19:50:26',
- 'chadongmin@example.com'),
-
- (2, 1, 'REVIEW', 'REVIEW_CREATE', 'api/v1/reviews',
- 'https://static.whiskybase.com/storage/whiskies/2/0/8916/404538-big.jpg', 1,
- 'blah blah', null, '2025', '01',
- '2025-01-02 19:50:35', 'chadongmin@example.com', '2025-01-20 19:50:35',
- 'chadongmin@example.com'),
-
- (3, 1, 'REVIEW', 'REVIEW_CREATE', 'api/v1/reviews',
- 'https://static.whiskybase.com/storage/whiskies/2/0/8888/404535-big.jpg', 2,
- '리뷰입니다.', null, '2025', '01',
- '2025-01-03 19:50:47', 'chadongmin@example.com', '2025-01-20 19:50:47',
- 'chadongmin@example.com'),
-
- (4, 1, 'REVIEW', 'REVIEW_CREATE', 'api/v1/reviews',
- 'https://static.whiskybase.com/storage/whiskies/2/1/1644/404542-big.jpg', 3,
- '리뷰 등록', null, '2025', '01',
- '2025-01-04 19:50:56', 'chadongmin@example.com', '2025-01-20 19:50:56',
- 'chadongmin@example.com'),
-
- (5, 1, 'PICK', 'UNPICK', 'api/v1/picks',
- 'https://static.whiskybase.com/storage/whiskies/2/0/8916/404538-big.jpg', 1,
- null, null, '2025', '01',
- '2025-01-05 19:52:07', 'chadongmin@example.com', '2025-01-20 19:52:07',
- 'chadongmin@example.com')
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-user-mybottle-query.sql b/bottlenote-product-api/src/test/resources/init-script/init-user-mybottle-query.sql
deleted file mode 100644
index 06443fb99..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-user-mybottle-query.sql
+++ /dev/null
@@ -1,343 +0,0 @@
-insert into users (email, nick_name, age, image_url, gender, role, status, social_type, refresh_token, create_at,
- last_modify_at)
-values ('hyejj19@naver.com', 'WOzU6J8541', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '["KAKAO"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoeWVqajE5QG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoxLCJpYXQiOjE3MTkwNDA2ODAsImV4cCI6MTcyMDI1MDI4MH0._s1r4Je9wFTvu_hV0sYBVRr5uDqiHXVBM22jS35YNbH0z-svrTYjysORA4J2J5GQcel9K5FxRBQnWjAeqQNfdw',
- NULL, NULL),
- ('chadongmin@naver.com', 'xIFo6J8726', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '["KAKAO"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJjaGFkb25nbWluQG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoyLCJpYXQiOjE3MjA3MDE2NjcsImV4cCI6MTcyMTkxMTI2N30.dNGvbasf2gccc4TImO2pGg7wIZi_VPNupGYmIRYqutRKrXq79ep0J-sE1OMpk7GC4y3nFkiqvwSWznHggrmRFA',
- NULL, NULL),
- ('dev.bottle-note@gmail.com', 'PARC6J8814', 25, NULL, 'MALE', 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJkZXYuYm90dGxlLW5vdGVAZ21haWwuY29tIiwicm9sZXMiOiJST0xFX1VTRVIiLCJ1c2VySWQiOjMsImlhdCI6MTcyMDM1MDY4OCwiZXhwIjoxNzIxNTYwMjg4fQ.two8yLXv2xFCEOhuGrLYV8cmewm8bD8EbIWTXYa896MprhgclsGNDThspjRF9VJmSA3mxvoPjnBJ0ClneCClBQ',
- NULL, NULL),
- ('eva.park@oysterable.com', 'VOKs6J8831', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJldmEucGFya0BveXN0ZXJhYmxlLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo1LCJpYXQiOjE3MTc4MzU1MDUsImV4cCI6MTcxOTA0NTEwNX0.j6u6u8a8lhedeegOe2wqOjNZkMx0X3RgVeAcvnlCZmj_AXQF5WDo4k71WI-bFt_ypW-ewVCRmdLQoOduaggCRw',
- NULL, NULL),
- ('rlagusrl928@gmail.com', 'hpPw6J111837', NULL, NULL, 'MALE', 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJybGFndXNybDkyOEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NiwiaWF0IjoxNzE4MDk4NjQxLCJleHAiOjE3MTkzMDgyNDF9.0nfUYMm4UEFzfE52ydulDZ0eX5U_2yBN4hCeBXr4PeA3xwbzDo7t2c2kJGNU_LXMbZg2Iz4DAIZnu0QB3DJ8VA',
- NULL, NULL),
- ('ytest@gmail.com', 'OMkS6J12123', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '["GOOGLE"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ5dGVzdEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NywiaWF0IjoxNzE4MTIzMDMxLCJleHAiOjE3MTkzMzI2MzF9.8KNJW6havezUSgaWmRyAvlxfwdRZxjdC7mcBuexN0Gy9NtgJIAVWqNMW0wlJXw7d9LVwtZf5Mv4aUdA_V-V8pw',
- NULL, NULL),
- ('juye@gmail.com', 'juye12', NULL, 'http://example.com/new-profile-image.jpg', NULL, 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqdXllQGdtYWlsLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo4LCJpYXQiOjE3MjA2OTg0MDcsImV4cCI6MTcyMTkwODAwN30.VaTNqvK-e8g9zsaOhoEmrKQKATCKtKqSIvuOCKpB0lS5L2I7Xd-iVhkwuVHfySalK0y_t_hf9CsIfeIjWgO0gw',
- NULL, NULL),
- ('rkdtkfma@naver.com', 'iZBq6J22547', NULL, NULL, NULL, 'ROLE_USER', 'ACTIVE', '["KAKAO"]',
- 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJya2R0a2ZtYUBuYXZlci5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6OSwiaWF0IjoxNzIwNzAzMjExLCJleHAiOjE3MjE5MTI4MTF9.pD-MCIPRxbYBLJ2ZPei_529YCop_a8yVKPCsz-YYlvCjyAM40aVQRPv2rDg2wfCZAr5c3NKyS210LwQXwxf1OQ',
- NULL, NULL);
-
-insert into regions (kor_name, eng_name, continent, description, create_at, create_by, last_modify_at, last_modify_by)
-values ('호주', 'Australia', null, '오세아니아에 위치한 나라로 다양한 위스키를 생산.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('핀란드', 'Finland', null, '북유럽에 위치한 나라로 청정한 자연환경을 자랑.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('프랑스', 'France', null, '와인과 브랜디로 유명한 유럽의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('타이완', 'Taiwan', null, '고품질의 위스키로 유명한 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('캐나다', 'Canada', null, '위스키 생산이 활발한 북미의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('체코', 'Czech Republic', null, '중앙유럽에 위치한 나라로 맥주로도 유명.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('일본', 'Japan', null, '전통과 현대가 조화된 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('인도', 'India', null, '다양한 문화와 역사를 지닌 남아시아의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('이스라엘', 'Israel', null, '중동에 위치한 나라로 와인과 위스키 생산이 증가.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('웨일즈', 'Wales', null, '영국의 구성국 중 하나로 독자적인 위스키 생산.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('영국', 'United Kingdom', null, '다양한 위스키 지역을 가진 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('아일랜드', 'Ireland', null, '풍부한 전통을 지닌 위스키의 본고장 중 하나입니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('아이슬란드', 'Iceland', null, '청정한 자연환경과 독특한 술 문화를 가진 섬나라입니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/캠벨타운', 'Scotland/Campbeltown', null, '스코틀랜드의 위스키 지역 중 하나로 해안가에 위치한 반도 형태의 지역입니다.', '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/아일라', 'Scotland/Islay', null, '피트위스키의 대표 생산지입니다. 스모키한맛이 특징인 위스키로 유명한 섬입니다.', '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/스페이사이드 ', 'Scotland/Speyside', null, '스코틀랜드의 중심부에 위치하고있습니다. 더프타운에 다양한 증류소들이 있습니다.',
- '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/로우랜드', 'Scotland/Lowlands', null, '부드럽고 가벼운 맛이 특징인 위스키로 유명합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/기타섬', 'Scotland/Islands', null, '다양한 섬에서 독특한 맛의 위스키를 생산하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드', 'Scotland/', null, '위스키의 본고장으로 다양한 스타일의 위스키를 생산합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코트랜드/하이랜드', 'Scotland/Highlands', null, '스코틀랜드 북부 지역으로 섬세한 맛의 위스키로 유명.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스위스', 'Switzerland', null, '알프스 산맥을 배경으로 한 유럽의 나라입니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('스웨덴', 'Sweden', null, '북유럽에 위치한 나라로 맥주와 위스키 생산 증가하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('미국', 'United States', null, '다양한 스타일의 위스키를 생산하는 나라. 주로 켄터키의 버번위스키가 유명합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('독일', 'Germany', null, '맥주로 유명한 나라로 위스키 생산도 활발합니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('덴마크', 'Denmark', null, '북유럽에 위치한 나라로 고유의 위스키를 생산합니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('네덜란드', 'Netherlands', null, '맥주와 진으로 유명한 나라로 위스키 생산도 증가하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin');
-
-insert into distilleries (kor_name, eng_name, logo_img_url, create_at, create_by, last_modify_at, last_modify_by)
-values ('글래스고', 'The Glasgow Distillery Co.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 그란트', 'Glen Grant', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 기어리', 'Glen Garioch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 모레이', 'Glen Moray', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 스코샤', 'Glen Scotia', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 스페이', 'Glen Spey', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 엘스', 'Glen Els', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 엘진', 'Glen Elgin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌가일', 'Glengyle', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌고인', 'Glengoyne', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌글라쏘', 'Glenglassaugh', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌달로', 'Glendalough Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌드로낙', 'Glendronach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌로시', 'Glenlossie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌로티스', 'Glenrothes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌리벳', 'Glenlivet', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌모렌지', 'Glenmorangie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌알라키', 'Glenallachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌카담', 'Glencadam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌킨치', 'Glenkinchie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌터렛', 'Glenturret', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌파클라스', 'Glenfarclas', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌피딕', 'Glenfiddich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글리나', 'Glina Destillerie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('녹듀', 'Knockdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('뉴 리브 티스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('뉴 리프 디스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달루인', 'Dailuaine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달모어', 'Dalmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달위니', 'Dalwhinnie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('더프타운', 'Dufftown', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딘스톤', 'Deanston', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딩글', 'The Dingle Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라가불린', 'Lagavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라세이', 'Raasay Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라프로익', 'Laphroaig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로얄 로크나가', 'Royal Lochnagar', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로얄 브라클라', 'Royal Brackla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로크몬드', 'Loch Lomond', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('루겐브로이', 'Rugenbräu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('링크우드', 'Linkwood', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('마르스 신슈', 'The Mars Shinshu Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥더프', 'Macduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥미라', 'Mackmyra', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥캘란', 'Macallan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('메이커스마크', 'Maker''s Mark Distillery, Inc.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('미들턴', 'Midleton (1975-)', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('미야기쿄', 'Miyagikyo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('믹터스', 'Michter''s Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('밀크 앤 허니', 'Milk & Honey Whisky Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('밀톤더프', 'Miltonduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('바렐 크래프트 스피릿', 'Barrell Craft Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발베니', 'Balvenie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발블레어', 'Balblair', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발코네스', 'Balcones Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('버팔로 트레이스', 'Buffalo Trace Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('베르그슬라겐스', 'Bergslagens Destilleri', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤 네비스', 'Ben Nevis', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤로막', 'Benromach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리네스', 'Benrinnes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리악', 'BenRiach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('보모어', 'Bowmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('부나하벤', 'Bunnahabhain', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('부시밀', 'Bushmills', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라우레이 로커', 'Brauerei Locher', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라운 포 맨', 'Brown-Forman Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라운슈타인', 'Braunstein', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브룩라디', 'Bruichladdich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('블라드녹', 'Bladnoch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('블레어 아톨', 'Blair Athol', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('설리반 코브', 'Sullivans Cove', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('세인트 킬리안', 'St. Kilian Distillers', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스뫼겐', 'Smögen', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스무스 앰블러 스피릿', 'Smooth Ambler Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스카파', 'Scapa', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스타워드', 'Starward', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스터닝', 'Stauning Whisky', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스트라스밀', 'Strathmill', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스트라티슬라', 'Strathisla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스페이번', 'Speyburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스페이사이드', 'Speyside Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스프링뱅크', 'Springbank', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('실리스', 'Slyrs', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드나머칸', 'Ardnamurchan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드모어', 'Ardmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드벡', 'Ardbeg', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아란', 'Arran', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아벨라워', 'Aberlour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아사카', 'Asaka', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('암룻', 'Amrut', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('애버펠디', 'Aberfeldy', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('야마자키', 'Yamazaki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두르', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두어', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에이가시마 슈조', 'Eigashima Shuzo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('오반', 'Oban', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('오켄토션', 'Auchentoshan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('와렝햄', 'Warenghem', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('와일드 터키', 'Wild Turkey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('요이치', 'Yoichi', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('우드포드 리저브', 'Woodford Reserve', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('울트모어', 'Aultmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('울프번', 'Wolfburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('월렛', 'Willett Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('웨스트랜드', 'Westland Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('위도우 제인', 'Widow Jane Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('잭다니엘', 'Jack Daniel''s', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('존', 'John Distilleries', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('주라', 'Isle of Jura', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쥐담', 'Zuidam Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('짐 빔', 'Jim Beam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('츠누키', 'Tsunuki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('치치부', 'Chichibu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카듀', 'Cardhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카발란', 'Kavalan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카퍼도니히', 'Caperdonich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨레이', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨리', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨일라', 'Caol Ila', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라겐모어', 'Cragganmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라이겔라키', 'Craigellachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라이넬리쉬', 'Clynelish', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('클레이', 'Cley Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('클로나킬티', 'Clonakilty Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('킬호만', 'Kilchoman', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탈라모어 듀', 'Tullamore Dew (2014 - present)', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('탈리스커', 'Talisker', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐나불린', 'Tamnavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐듀', 'Tamdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('터틸타운 스피리츠', 'Tuthilltown Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('테렌펠리', 'Teerenpeli', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토마틴', 'Tomatin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토모어', 'Tormore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토민타울', 'Tomintoul', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토버모리', 'Tobermory', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('툴리바딘', 'Tullibardine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('티니닉', 'Teaninich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('틸링', 'Teeling Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('페터케른', 'Fettercairn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('펜데린', 'Penderyn Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('포 로지스', 'Four Roses Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('풀티니', 'Pulteney', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하이 코스트', 'High Coast Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하이랜드 파크', 'Highland Park', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하쿠슈', 'Hakushu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('헤븐힐', 'Heaven Hill Distilleries, Inc.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('후지 코텐바', 'Fuji Gotemba', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('휘슬피그', 'WhistlePig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('휘슬피거', 'WhistlePager', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('ETC', 'ETC', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin');
-
-insert into alcohols (kor_name, eng_name, abv, type, kor_category, eng_category, category_group, region_id,
- distillery_id, age, cask, image_url, create_at, create_by, last_modify_at, last_modify_by)
-values ('라이터스 티얼즈 레드 헤드', 'Writers'' Tears Red Head', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 150,
- null, 'Oloroso Sherry Butts', 'https://static.whiskybase.com/storage/whiskies/1/8/3881/318643-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 더블 오크', 'Writers'' Tears Double Oak', '46', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'American & French Oak', 'https://static.whiskybase.com/storage/whiskies/1/3/1308/282645-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 코퍼 팟', 'Writers'' Tears Copper Pot', '40', 'WHISKY', '블렌디드 몰트', 'Blended Malt', 'BLENDED_MALT', 12,
- 150, null, 'Bourbon Barrels', 'https://static.whiskybase.com/storage/whiskies/7/7/471/189958-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('VAT 69 블렌디드 스카치 위스키', 'VAT 69 Blended Scotch Whisky', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 16, 150, null,
- null, 'https://static.whiskybase.com/storage/whiskies/8/1/189/246095-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('툴리바딘 소버린', 'Tullibardine Sovereign', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 137, null,
- '1st fill bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/7/4450/390659-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 XO', 'Tullamore Dew XO', '43', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 127, null,
- 'Caribbean Rum Cask Finish', 'https://static.whiskybase.com/storage/whiskies/1/0/9073/192995-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 사이다 캐스크 피니시', 'Tullamore Dew Cider Cask Finish', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'Cider Cask Finish', 'https://static.whiskybase.com/storage/whiskies/6/9/408/192993-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 14년', 'Tullamore Dew 14y', '41.3', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 47, '14',
- 'Bourbon, Oloroso Sherry, Port, Madeira Finish',
- 'https://static.whiskybase.com/storage/whiskies/7/8/743/201942-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 12년', 'Tullamore Dew 12y', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, '12',
- 'Ex-Bourbon & Oloroso Sherry Casks', 'https://static.whiskybase.com/storage/whiskies/8/1/442/229572-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 16년', 'Tormore 16y', '48', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '16',
- 'American Oak Cask', 'https://static.whiskybase.com/storage/whiskies/2/0/0044/349731-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 14년', 'Tormore 14y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '14', 'American Oak',
- 'https://static.whiskybase.com/storage/whiskies/4/6/006/87125-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 피티탱', 'Tomintoul With A Peaty Tang', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- null, 'https://static.whiskybase.com/storage/whiskies/1/2/2408/373021-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 시가몰트', 'Tomintoul Cigar Malt', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- 'Oloroso', 'https://static.whiskybase.com/storage/whiskies/1/6/7902/372433-big.jpg', '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 16년', 'Tomintoul 16y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '16', null,
- 'https://static.whiskybase.com/storage/whiskies/6/7/387/106575-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 14년', 'Tomintoul 14y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '14',
- 'American oak ex-bourbon', 'https://static.whiskybase.com/storage/whiskies/2/0/0756/133825-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 10년', 'Tomintoul 10y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '10',
- 'American oak ex-bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/2/2573/205398-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아벨라워 18년', 'Aberlour 18y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 89, '18',
- 'Am. & Eur. Oak + 1st-Fill PX & Oloroso Finish',
- 'https://static.whiskybase.com/storage/whiskies/2/3/7131/424101-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('포트 샬롯 10년', 'Port Charlotte 10y', '50', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 15, 69, '10', null,
- 'https://static.whiskybase.com/storage/whiskies/1/1/2320/201819-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('카듀 엠버 록', 'Cardhu Amber Rock', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 115, null,
- 'Bourbon Cask', 'https://static.whiskybase.com/storage/whiskies/5/4/607/343007-big.jpg', '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아드나머칸 AD', 'Ardnamurchan AD/', '46.8', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 85, null,
- 'Bourbon & Sherry', 'https://static.whiskybase.com/storage/whiskies/2/2/5270/415209-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('울프번 10년', 'Wolfburn 10y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 104, '10',
- 'Oloroso Sherry Hogsheads', 'https://static.whiskybase.com/storage/whiskies/2/3/0518/412215-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin');
-
-INSERT INTO follows (id, user_id, follow_user_id, status, create_at, create_by, last_modify_at, last_modify_by)
-VALUES (1, 8, 1, 'FOLLOWING', '2024-06-14 08:35:59', 'dev.bottle-note@gmail.com', '2024-06-27 22:13:55',
- 'dev.bottle-note@gmail.com'),
- (2, 8, 2, 'FOLLOWING', '2024-06-16 19:52:34', 'dev.bottle-note@gmail.com', '2024-06-16 19:52:34',
- 'dev.bottle-note@gmail.com'),
- (3, 8, 3, 'FOLLOWING', '2024-06-16 19:52:41', 'dev.bottle-note@gmail.com', '2024-06-16 19:52:41',
- 'dev.bottle-note@gmail.com'),
- (4, 3, 1, 'FOLLOWING', '2024-08-17 13:23:27', 'dev.bottle-note@gmail.com', '2024-08-17 13:23:27',
- 'dev.bottle-note@gmail.com');
-
-INSERT INTO picks (id, user_id, alcohol_id, status, create_at, last_modify_at)
-VALUES (1, 3, 2, 'PICK', '2024-06-11 02:45:38', '2024-06-11 02:45:38'),
- (2, 4, 3, 'UNPICK', '2024-06-22 17:32:32', '2024-07-14 17:23:42'),
- (3, 8, 1, 'PICK', '2024-06-27 22:14:06', '2024-06-27 22:14:06'),
- (4, 4, 4, 'UNPICK', '2024-07-14 17:25:56', '2024-07-14 20:43:18'),
- (5, 1, 5, 'UNPICK', '2024-07-18 21:12:45', '2024-07-18 21:12:45'),
- (6, 1, 6, 'UNPICK', '2024-07-18 21:12:47', '2024-07-18 21:12:47'),
- (7, 1, 7, 'PICK', '2024-07-18 22:01:45', '2024-07-18 22:01:45'),
- (8, 1, 8, 'PICK', '2024-07-28 13:46:54', '2024-08-01 21:22:16');
-
-INSERT INTO ratings (alcohol_id, user_id, rating, create_at, create_by, last_modify_at, last_modify_by)
-VALUES (1, 3, 3.5, '2024-07-07 19:46:40', NULL, '2024-07-07 19:46:40', NULL),
- (1, 6, 3.5, '2024-08-11 14:12:26', 'rlagusrl928@gmail.com', '2024-08-11 14:12:26', 'rlagusrl928@gmail.com'),
- (2, 3, 3.5, '2024-06-11 02:39:27', NULL, '2024-06-11 02:39:27', NULL),
- (2, 8, 3.5, '2024-06-25 21:14:32', NULL, '2024-06-25 21:14:32', NULL),
- (2, 6, 4, '2024-07-11 21:44:39', NULL, '2024-07-11 21:58:02', NULL),
- (3, 1, 4.5, '2024-08-01 22:43:31', 'hyejj19@naver.com', '2024-08-01 22:51:49', 'hyejj19@naver.com'),
- (4, 1, 4.5, '2024-08-01 21:57:42', 'hyejj19@naver.com', '2024-08-01 21:57:42', 'hyejj19@naver.com'),
- (5, 1, 4, '2024-08-01 21:57:48', 'hyejj19@naver.com', '2024-08-01 21:57:48', 'hyejj19@naver.com'),
- (6, 4, 5, '2024-08-13 20:05:35', 'cdm2883@gmail.com', '2024-08-13 20:05:35', 'cdm2883@gmail.com'),
- (7, 1, 4.5, '2024-08-01 21:26:20', 'hyejj19@naver.com', '2024-08-01 21:26:20', 'hyejj19@naver.com'),
- (1, 4, 0.5, '2024-08-11 14:10:28', 'rkdtkfma@naver.com', '2024-08-11 14:10:28', 'rkdtkfma@naver.com');
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-user-mypage-query.sql b/bottlenote-product-api/src/test/resources/init-script/init-user-mypage-query.sql
deleted file mode 100644
index 260ca2919..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-user-mypage-query.sql
+++ /dev/null
@@ -1,354 +0,0 @@
-insert into users (email, nick_name, age, image_url, gender, role, status, social_type,
- last_login_at, refresh_token,
- create_at, last_modify_at)
-values ('hyejj19@naver.com', 'WOzU6J8541', null, null, 'FEMALE', 'ROLE_USER', 'ACTIVE', '["GOOGLE"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoeWVqajE5QG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoxLCJpYXQiOjE3MTkwNDA2ODAsImV4cCI6MTcyMDI1MDI4MH0._s1r4Je9wFTvu_hV0sYBVRr5uDqiHXVBM22jS35YNbH0z-svrTYjysORA4J2J5GQcel9K5FxRBQnWjAeqQNfdw',
- null, null),
- ('chadongmin@naver.com', 'xIFo6J8726', null, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '["KAKAO"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJjaGFkb25nbWluQG5hdmVyLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjoyLCJpYXQiOjE3MjA3MDE2NjcsImV4cCI6MTcyMTkxMTI2N30.dNGvbasf2gccc4TImO2pGg7wIZi_VPNupGYmIRYqutRKrXq79ep0J-sE1OMpk7GC4y3nFkiqvwSWznHggrmRFA',
- null, null),
- ('dev.bottle-note@gmail.com', 'PARC6J8814', 25, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJkZXYuYm90dGxlLW5vdGVAZ21haWwuY29tIiwicm9sZXMiOiJST0xFX1VTRVIiLCJ1c2VySWQiOjMsImlhdCI6MTcyMDM1MDY4OCwiZXhwIjoxNzIxNTYwMjg4fQ.two8yLXv2xFCEOhuGrLYV8cmewm8bD8EbIWTXYa896MprhgclsGNDThspjRF9VJmSA3mxvoPjnBJ0ClneCClBQ',
- null, null),
- ('eva.park@oysterable.com', 'VOKs6J8831', null, null, null, 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJldmEucGFya0BveXN0ZXJhYmxlLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo1LCJpYXQiOjE3MTc4MzU1MDUsImV4cCI6MTcxOTA0NTEwNX0.j6u6u8a8lhedeegOe2wqOjNZkMx0X3RgVeAcvnlCZmj_AXQF5WDo4k71WI-bFt_ypW-ewVCRmdLQoOduaggCRw',
- null, null),
- ('rlagusrl928@gmail.com', 'hpPw6J111837', null, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJybGFndXNybDkyOEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NiwiaWF0IjoxNzE4MDk4NjQxLCJleHAiOjE3MTkzMDgyNDF9.0nfUYMm4UEFzfE52ydulDZ0eX5U_2yBN4hCeBXr4PeA3xwbzDo7t2c2kJGNU_LXMbZg2Iz4DAIZnu0QB3DJ8VA',
- null, null),
- ('ytest@gmail.com', 'OMkS6J12123', null, null, 'MALE', 'ROLE_USER', 'ACTIVE', '["GOOGLE"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ5dGVzdEBnbWFpbC5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6NywiaWF0IjoxNzE4MTIzMDMxLCJleHAiOjE3MTkzMzI2MzF9.8KNJW6havezUSgaWmRyAvlxfwdRZxjdC7mcBuexN0Gy9NtgJIAVWqNMW0wlJXw7d9LVwtZf5Mv4aUdA_V-V8pw',
- null, null),
- ('juye@gmail.com', 'juye12', null,
- '{ "viewUrl": "http://example.com/new-profile-image.jpg" }', 'FEMALE', 'ROLE_USER', 'ACTIVE',
- '["GOOGLE"]',
- NOW(), 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJqdXllQGdtYWlsLmNvbSIsInJvbGVzIjoiUk9MRV9VU0VSIiwidXNlcklkIjo4LCJpYXQiOjE3MjA2OTg0MDcsImV4cCI6MTcyMTkwODAwN30.VaTNqvK-e8g9zsaOhoEmrKQKATCKtKqSIvuOCKpB0lS5L2I7Xd-iVhkwuVHfySalK0y_t_hf9CsIfeIjWgO0gw',
- null, null),
- ('rkdtkfma@naver.com', 'iZBq6J22547', null, null, 'MALE', 'ROLE_USER', 'ACTIVE', '["KAKAO"]',
- null, 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJya2R0a2ZtYUBuYXZlci5jb20iLCJyb2xlcyI6IlJPTEVfVVNFUiIsInVzZXJJZCI6OSwiaWF0IjoxNzIwNzAzMjExLCJleHAiOjE3MjE5MTI4MTF9.pD-MCIPRxbYBLJ2ZPei_529YCop_a8yVKPCsz-YYlvCjyAM40aVQRPv2rDg2wfCZAr5c3NKyS210LwQXwxf1OQ',
- null, null);
-
--- 지역
-insert into regions (kor_name, eng_name, continent, description, create_at, create_by, last_modify_at, last_modify_by)
-values ('호주', 'Australia', null, '오세아니아에 위치한 나라로 다양한 위스키를 생산.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('핀란드', 'Finland', null, '북유럽에 위치한 나라로 청정한 자연환경을 자랑.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('프랑스', 'France', null, '와인과 브랜디로 유명한 유럽의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('타이완', 'Taiwan', null, '고품질의 위스키로 유명한 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('캐나다', 'Canada', null, '위스키 생산이 활발한 북미의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('체코', 'Czech Republic', null, '중앙유럽에 위치한 나라로 맥주로도 유명.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('일본', 'Japan', null, '전통과 현대가 조화된 동아시아의 섬나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('인도', 'India', null, '다양한 문화와 역사를 지닌 남아시아의 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('이스라엘', 'Israel', null, '중동에 위치한 나라로 와인과 위스키 생산이 증가.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('웨일즈', 'Wales', null, '영국의 구성국 중 하나로 독자적인 위스키 생산.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('영국', 'United Kingdom', null, '다양한 위스키 지역을 가진 나라.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('아일랜드', 'Ireland', null, '풍부한 전통을 지닌 위스키의 본고장 중 하나입니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('아이슬란드', 'Iceland', null, '청정한 자연환경과 독특한 술 문화를 가진 섬나라입니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/캠벨타운', 'Scotland/Campbeltown', null, '스코틀랜드의 위스키 지역 중 하나로 해안가에 위치한 반도 형태의 지역입니다.', '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/아일라', 'Scotland/Islay', null, '피트위스키의 대표 생산지입니다. 스모키한맛이 특징인 위스키로 유명한 섬입니다.', '2024-06-04 17:19:39',
- 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/스페이사이드 ', 'Scotland/Speyside', null, '스코틀랜드의 중심부에 위치하고있습니다. 더프타운에 다양한 증류소들이 있습니다.',
- '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/로우랜드', 'Scotland/Lowlands', null, '부드럽고 가벼운 맛이 특징인 위스키로 유명합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드/기타섬', 'Scotland/Islands', null, '다양한 섬에서 독특한 맛의 위스키를 생산하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코틀랜드', 'Scotland/', null, '위스키의 본고장으로 다양한 스타일의 위스키를 생산합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스코트랜드/하이랜드', 'Scotland/Highlands', null, '스코틀랜드 북부 지역으로 섬세한 맛의 위스키로 유명.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('스위스', 'Switzerland', null, '알프스 산맥을 배경으로 한 유럽의 나라입니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('스웨덴', 'Sweden', null, '북유럽에 위치한 나라로 맥주와 위스키 생산 증가하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('미국', 'United States', null, '다양한 스타일의 위스키를 생산하는 나라. 주로 켄터키의 버번위스키가 유명합니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin'),
- ('독일', 'Germany', null, '맥주로 유명한 나라로 위스키 생산도 활발합니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('덴마크', 'Denmark', null, '북유럽에 위치한 나라로 고유의 위스키를 생산합니다.', '2024-06-04 17:19:39', 'admin', '2024-06-04 17:19:39',
- 'admin'),
- ('네덜란드', 'Netherlands', null, '맥주와 진으로 유명한 나라로 위스키 생산도 증가하고 있습니다.', '2024-06-04 17:19:39', 'admin',
- '2024-06-04 17:19:39', 'admin');
-
--- 증류소
-insert into distilleries (kor_name, eng_name, logo_img_url, create_at, create_by, last_modify_at, last_modify_by)
-values ('글래스고', 'The Glasgow Distillery Co.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 그란트', 'Glen Grant', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 기어리', 'Glen Garioch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 모레이', 'Glen Moray', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 스코샤', 'Glen Scotia', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 스페이', 'Glen Spey', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 엘스', 'Glen Els', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌 엘진', 'Glen Elgin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌가일', 'Glengyle', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌고인', 'Glengoyne', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌글라쏘', 'Glenglassaugh', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌달로', 'Glendalough Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌드로낙', 'Glendronach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌로시', 'Glenlossie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌로티스', 'Glenrothes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌리벳', 'Glenlivet', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌모렌지', 'Glenmorangie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌알라키', 'Glenallachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌카담', 'Glencadam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌킨치', 'Glenkinchie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌터렛', 'Glenturret', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌파클라스', 'Glenfarclas', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글렌피딕', 'Glenfiddich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('글리나', 'Glina Destillerie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('녹듀', 'Knockdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('뉴 리브 티스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('뉴 리프 디스틸링', 'New Riff Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달루인', 'Dailuaine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달모어', 'Dalmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('달위니', 'Dalwhinnie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('더프타운', 'Dufftown', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딘스톤', 'Deanston', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('딩글', 'The Dingle Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라가불린', 'Lagavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라세이', 'Raasay Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('라프로익', 'Laphroaig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로얄 로크나가', 'Royal Lochnagar', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로얄 브라클라', 'Royal Brackla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('로크몬드', 'Loch Lomond', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('루겐브로이', 'Rugenbräu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('링크우드', 'Linkwood', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('마르스 신슈', 'The Mars Shinshu Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥더프', 'Macduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥미라', 'Mackmyra', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('맥캘란', 'Macallan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('메이커스마크', 'Maker''s Mark Distillery, Inc.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('미들턴', 'Midleton (1975-)', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('미야기쿄', 'Miyagikyo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('믹터스', 'Michter''s Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('밀크 앤 허니', 'Milk & Honey Whisky Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('밀톤더프', 'Miltonduff', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('바렐 크래프트 스피릿', 'Barrell Craft Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발베니', 'Balvenie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발블레어', 'Balblair', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('발코네스', 'Balcones Distilling', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('버팔로 트레이스', 'Buffalo Trace Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('베르그슬라겐스', 'Bergslagens Destilleri', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤 네비스', 'Ben Nevis', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤로막', 'Benromach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리네스', 'Benrinnes', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('벤리악', 'BenRiach', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('보모어', 'Bowmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('부나하벤', 'Bunnahabhain', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('부시밀', 'Bushmills', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라우레이 로커', 'Brauerei Locher', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라운 포 맨', 'Brown-Forman Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브라운슈타인', 'Braunstein', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('브룩라디', 'Bruichladdich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('블라드녹', 'Bladnoch', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('블레어 아톨', 'Blair Athol', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('설리반 코브', 'Sullivans Cove', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('세인트 킬리안', 'St. Kilian Distillers', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스뫼겐', 'Smögen', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스무스 앰블러 스피릿', 'Smooth Ambler Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스카파', 'Scapa', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스타워드', 'Starward', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스터닝', 'Stauning Whisky', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스트라스밀', 'Strathmill', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스트라티슬라', 'Strathisla', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스페이번', 'Speyburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스페이사이드', 'Speyside Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('스프링뱅크', 'Springbank', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('실리스', 'Slyrs', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드나머칸', 'Ardnamurchan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드모어', 'Ardmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아드벡', 'Ardbeg', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아란', 'Arran', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아벨라워', 'Aberlour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('아사카', 'Asaka', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('암룻', 'Amrut', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('애버펠디', 'Aberfeldy', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('야마자키', 'Yamazaki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두르', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에드라두어', 'Edradour', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('에이가시마 슈조', 'Eigashima Shuzo', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('오반', 'Oban', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('오켄토션', 'Auchentoshan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('와렝햄', 'Warenghem', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('와일드 터키', 'Wild Turkey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('요이치', 'Yoichi', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('우드포드 리저브', 'Woodford Reserve', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('울트모어', 'Aultmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('울프번', 'Wolfburn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('월렛', 'Willett Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('웨스트랜드', 'Westland Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('위도우 제인', 'Widow Jane Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('잭다니엘', 'Jack Daniel''s', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('존', 'John Distilleries', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('주라', 'Isle of Jura', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쥐담', 'Zuidam Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('짐 빔', 'Jim Beam', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('츠누키', 'Tsunuki', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('치치부', 'Chichibu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카듀', 'Cardhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카발란', 'Kavalan', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('카퍼도니히', 'Caperdonich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨레이', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨리', 'Cooley', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('쿨일라', 'Caol Ila', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라겐모어', 'Cragganmore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라이겔라키', 'Craigellachie', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('크라이넬리쉬', 'Clynelish', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('클레이', 'Cley Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('클로나킬티', 'Clonakilty Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('킬호만', 'Kilchoman', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탈라모어 듀', 'Tullamore Dew (2014 - present)', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03',
- 'admin'),
- ('탈리스커', 'Talisker', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐나불린', 'Tamnavulin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('탐듀', 'Tamdhu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('터틸타운 스피리츠', 'Tuthilltown Spirits', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('테렌펠리', 'Teerenpeli', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토마틴', 'Tomatin', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토모어', 'Tormore', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토민타울', 'Tomintoul', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('토버모리', 'Tobermory', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('툴리바딘', 'Tullibardine', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('티니닉', 'Teaninich', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('틸링', 'Teeling Whiskey Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('페터케른', 'Fettercairn', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('펜데린', 'Penderyn Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('포 로지스', 'Four Roses Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('풀티니', 'Pulteney', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하이 코스트', 'High Coast Distillery', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하이랜드 파크', 'Highland Park', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('하쿠슈', 'Hakushu', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('헤븐힐', 'Heaven Hill Distilleries, Inc.', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('후지 코텐바', 'Fuji Gotemba', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('휘슬피그', 'WhistlePig', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('휘슬피거', 'WhistlePager', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin'),
- ('ETC', 'ETC', null, '2024-06-04 17:09:03', 'admin', '2024-06-04 17:09:03', 'admin');
-
--- 알콜
-insert into alcohols (kor_name, eng_name, abv, type, kor_category, eng_category, category_group, region_id,
- distillery_id, age, cask, image_url, create_at, create_by, last_modify_at, last_modify_by)
-values ('라이터스 티얼즈 레드 헤드', 'Writers'' Tears Red Head', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 150,
- null, 'Oloroso Sherry Butts', 'https://static.whiskybase.com/storage/whiskies/1/8/3881/318643-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 더블 오크', 'Writers'' Tears Double Oak', '46', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'American & French Oak', 'https://static.whiskybase.com/storage/whiskies/1/3/1308/282645-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('라이터스 티얼즈 코퍼 팟', 'Writers'' Tears Copper Pot', '40', 'WHISKY', '블렌디드 몰트', 'Blended Malt', 'BLENDED_MALT', 12,
- 150, null, 'Bourbon Barrels', 'https://static.whiskybase.com/storage/whiskies/7/7/471/189958-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('VAT 69 블렌디드 스카치 위스키', 'VAT 69 Blended Scotch Whisky', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 16, 150, null,
- null, 'https://static.whiskybase.com/storage/whiskies/8/1/189/246095-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('툴리바딘 소버린', 'Tullibardine Sovereign', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 137, null,
- '1st fill bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/7/4450/390659-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 XO', 'Tullamore Dew XO', '43', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 127, null,
- 'Caribbean Rum Cask Finish', 'https://static.whiskybase.com/storage/whiskies/1/0/9073/192995-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 사이다 캐스크 피니시', 'Tullamore Dew Cider Cask Finish', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, null,
- 'Cider Cask Finish', 'https://static.whiskybase.com/storage/whiskies/6/9/408/192993-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 14년', 'Tullamore Dew 14y', '41.3', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 12, 47, '14',
- 'Bourbon, Oloroso Sherry, Port, Madeira Finish',
- 'https://static.whiskybase.com/storage/whiskies/7/8/743/201942-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 12년', 'Tullamore Dew 12y', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND', 12, 47, '12',
- 'Ex-Bourbon & Oloroso Sherry Casks', 'https://static.whiskybase.com/storage/whiskies/8/1/442/229572-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 16년', 'Tormore 16y', '48', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '16',
- 'American Oak Cask', 'https://static.whiskybase.com/storage/whiskies/2/0/0044/349731-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토모어 14년', 'Tormore 14y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 134, '14', 'American Oak',
- 'https://static.whiskybase.com/storage/whiskies/4/6/006/87125-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 피티탱', 'Tomintoul With A Peaty Tang', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- null, 'https://static.whiskybase.com/storage/whiskies/1/2/2408/373021-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 시가몰트', 'Tomintoul Cigar Malt', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, null,
- 'Oloroso', 'https://static.whiskybase.com/storage/whiskies/1/6/7902/372433-big.jpg', '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 16년', 'Tomintoul 16y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '16', null,
- 'https://static.whiskybase.com/storage/whiskies/6/7/387/106575-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('토민타울 14년', 'Tomintoul 14y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '14',
- 'American oak ex-bourbon', 'https://static.whiskybase.com/storage/whiskies/2/0/0756/133825-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('토민타울 10년', 'Tomintoul 10y', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 135, '10',
- 'American oak ex-bourbon barrel', 'https://static.whiskybase.com/storage/whiskies/1/2/2573/205398-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아벨라워 18년', 'Aberlour 18y', '43', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 89, '18',
- 'Am. & Eur. Oak + 1st-Fill PX & Oloroso Finish',
- 'https://static.whiskybase.com/storage/whiskies/2/3/7131/424101-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('포트 샬롯 10년', 'Port Charlotte 10y', '50', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 15, 69, '10', null,
- 'https://static.whiskybase.com/storage/whiskies/1/1/2320/201819-big.jpg', '2024-06-08 05:06:00', 'admin',
- '2024-06-08 05:06:00', 'admin'),
- ('카듀 엠버 록', 'Cardhu Amber Rock', '40', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 16, 115, null,
- 'Bourbon Cask', 'https://static.whiskybase.com/storage/whiskies/5/4/607/343007-big.jpg', '2024-06-08 05:06:00',
- 'admin', '2024-06-08 05:06:00', 'admin'),
- ('탈라모어 듀 더 레전더리 아이리시 위스키', 'Tullamore Dew The Legendary Irish Whiskey', '40', 'WHISKY', '블렌디드', 'Blend', 'BLEND',
- 12, 47, null, null, 'https://static.whiskybase.com/storage/whiskies/4/0/935/122228-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('아드나머칸 AD', 'Ardnamurchan AD/', '46.8', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 85, null,
- 'Bourbon & Sherry', 'https://static.whiskybase.com/storage/whiskies/2/2/5270/415209-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin'),
- ('울프번 10년', 'Wolfburn 10y', '46', 'WHISKY', '싱글 몰트', 'Single Malt', 'SINGLE_MALT', 20, 104, '10',
- 'Oloroso Sherry Hogsheads', 'https://static.whiskybase.com/storage/whiskies/2/3/0518/412215-big.jpg',
- '2024-06-08 05:06:00', 'admin', '2024-06-08 05:06:00', 'admin');
-
--- review 테이블에 데이터 삽입
-INSERT INTO reviews
-(id, user_id, alcohol_id, is_best, content, size_type, price, location_name, zip_code, address,
- detail_address, category, map_url, latitude, longitude, status,
- image_url, view_count, active_status, create_at, create_by, last_modify_at, last_modify_by)
-VALUES (1, 3, 1, true, '이 위스키는 풍부하고 복잡한 맛이 매력적입니다.', 'BOTTLE', 65000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map1', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image01.jpg', NULL, 'ACTIVE', '2024-05-05 12:00:00', NULL,
- NULL, NULL),
- (2, 4, 1, false, '가벼우면서도 깊은 맛이 느껴지는 위스키입니다.', 'GLASS', 45000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map2', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image02.jpg', NULL, 'ACTIVE', '2024-05-02 13:00:00', NULL,
- NULL, NULL),
- (3, 1, 1, false, '향기로운 바닐라 향이 나는 부드러운 위스키입니다.', 'BOTTLE', 77000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map3', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image03.jpg', NULL, 'ACTIVE', '2024-05-16 14:30:00', NULL,
- NULL, NULL),
- (4, 2, 2, false, '스모키하고 강한 페트 향이 인상적인 위스키입니다.', 'BOTTLE', 120000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map4', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image04.jpg', NULL, 'ACTIVE', '2024-05-01 15:45:00', NULL,
- NULL, NULL),
- (5, 5, 2, false, '달콤한 캐러멜과 과일 향이 조화를 이루는 맛있습니다.', 'GLASS', 99000, 'xxPub', '06000',
- '서울시 강남구 청담동', 'xxPub 청담점', 'bar', 'https://maps.example.com/map5', '12.123', '12.123',
- 'PUBLIC', 'https://example.com/image05.jpg', NULL, 'ACTIVE', '2024-05-08 16:00:00', NULL,
- NULL, NULL);
-
-
-insert into follows (user_id, follow_user_id, status, create_at, last_modify_at)
-values (1, 2, 'FOLLOWING', now(), now()),
- (2, 3, 'FOLLOWING', now(), now()),
- (3, 1, 'FOLLOWING', now(), now());
-
-
-insert into ratings (user_id, alcohol_id, rating, create_at, last_modify_at)
-values (1, 1, 5, now(), now()),
- (2, 1, 4, now(), now()),
- (3, 2, 5, now(), now());
diff --git a/bottlenote-product-api/src/test/resources/init-script/init-user.sql b/bottlenote-product-api/src/test/resources/init-script/init-user.sql
deleted file mode 100644
index 222308f42..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/init-user.sql
+++ /dev/null
@@ -1,41 +0,0 @@
-insert into users (email, nick_name, age, image_url, gender, role, status, social_type,
- last_login_at, create_at, last_modify_at)
-values ('hyejj19@naver.com', 'WOzU6J8541', null, null, 'FEMALE', 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
-]',
- null, null, null),
- ('chadongmin@naver.com', 'xIFo6J8726', null, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "KAKAO"
- ]',
- null, null, null),
- ('dev.bottle-note@gmail.com', 'PARC6J8814', 25, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- null, null, null),
- ('eva.park@oysterable.com', 'VOKs6J8831', null, null, 'FEMALE', 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- null, null, null),
- ('rlagusrl928@gmail.com', 'hpPw6J111837', null, null, 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "KAKAO"
- ]',
- null, null, null),
- ('ytest@gmail.com', 'OMkS6J12123', null, null, 'MALE', 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
- ]',
- null, null, null),
- ('juye@gmail.com', 'juye12', null,
- '{ "viewUrl": "http://example.com/new-profile-image.jpg" }', 'MALE', 'ROLE_USER', 'ACTIVE',
- '[
- "GOOGLE"
- ]',
- NOW(), null, null),
- ('rkdtkfma@naver.com', 'iZBq6J22547', null, null, null, 'ROLE_USER', 'ACTIVE', '[
- "KAKAO"
- ]',
- null, null, null)
-ON DUPLICATE KEY UPDATE email = email;
diff --git a/bottlenote-product-api/src/test/resources/init-script/schema.sql.bak b/bottlenote-product-api/src/test/resources/init-script/schema.sql.bak
deleted file mode 100644
index d865f24d9..000000000
--- a/bottlenote-product-api/src/test/resources/init-script/schema.sql.bak
+++ /dev/null
@@ -1,437 +0,0 @@
-CREATE TABLE `region`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '국가',
- `kor_name` varchar(255) NOT NULL COMMENT '국가 한글명',
- `eng_name` varchar(255) NOT NULL COMMENT '국가 영문명',
- `continent` varchar(255) NULL COMMENT '대륙',
- `description` varchar(255) NULL COMMENT '주석',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`)
-) COMMENT = '국가';
-
-CREATE TABLE `distillery`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '증류소',
- `kor_name` varchar(255) NOT NULL COMMENT '증류소 한글 이름',
- `eng_name` varchar(255) NOT NULL COMMENT '증류소 영문 이름',
- `logo_img_url` varchar(255) NULL COMMENT '로고 이미지',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`)
-) COMMENT = '증류소';
-
-CREATE TABLE `alcohol`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '술',
- `kor_name` varchar(255) NOT NULL COMMENT '한글 이름',
- `eng_name` varchar(255) NOT NULL COMMENT '영문 이름',
- `abv` varchar(255) NULL COMMENT '도수',
- `type` varchar(255) NOT NULL COMMENT '위스키 고정 ( 추후 럼,진등으로 확장 가능)',
- `kor_category` varchar(255) NOT NULL COMMENT '위스키, 럼, 브랜디의 하위상세 카테고리 한글명',
- `eng_category` varchar(255) NOT NULL COMMENT '위스키, 럼, 브랜디의 하위상세 카테고리 영문명 ',
- `category_group` varchar(255) NOT NULL COMMENT '하위 카테고리 그룹',
- `region_id` bigint NULL COMMENT 'https://www.data.go.kr/data/15076566/fileData.do?recommendDataYn=Y',
- `distillery_id` bigint NULL COMMENT '증류소 정보',
- `age` varchar(255) NULL COMMENT '숙성년도',
- `cask` varchar(255) NULL COMMENT '캐스트 타입(단순 문자열로 박기) - 한글 정제화가 힘들 수 있음. 영문사용 권장',
- `image_url` varchar(255) NULL COMMENT '썸네일 이미지',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`region_id`) REFERENCES `region` (`id`),
- FOREIGN KEY (`distillery_id`) REFERENCES `distillery` (`id`)
-) COMMENT = '술';
-
-CREATE TABLE `users`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '사용자',
- `email` varchar(255) NOT NULL COMMENT '사용자 소셜 이메일',
- `password` varchar(255) NULL COMMENT '사용자 비밀번호',
- `nick_name` varchar(255) NOT NULL COMMENT '사용자 소셜 닉네임 ( 수정 가능 )',
- `age` Integer NULL COMMENT '사용자 나이',
- `image_url` varchar(255) NULL COMMENT '사용자 프로필 이미지',
- `gender` varchar(255) NULL COMMENT '사용자 성별',
- `role` varchar(255) NOT NULL COMMENT '사용자 역할' DEFAULT 'GUEST',
- `status` varchar(255) NOT NULL COMMENT '사용자 상태',
- `social_type` json NOT NULL COMMENT '소셜 타입 ( NAVER ,GOOGLE , APPLE )',
- `refresh_token` varchar(255) NULL COMMENT 'access token 재발급을 위한 토큰',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- PRIMARY KEY (`id`),
- UNIQUE KEY `email` (`email`),
- UNIQUE KEY `nick_name` (`nick_name`)
-) COMMENT = '사용자';
-
-CREATE TABLE `picks`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '찜하기',
- `user_id` bigint NOT NULL COMMENT '찜한 사용자',
- `alcohol_id` bigint NOT NULL COMMENT '찜한 술',
- `status` varchar(255) NOT NULL COMMENT '찜 취소 찜 재취소',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- FOREIGN KEY (`alcohol_id`) REFERENCES `alcohol` (`id`)
-) COMMENT = '찜하기';
-
-create table popular_alcohol
-(
- id bigint auto_increment comment '기본 키'
- primary key,
- alcohol_id bigint not null comment '술 ID',
- year smallint not null comment '년도',
- month tinyint not null comment '월',
- day tinyint not null comment '일',
- review_score decimal(5, 2) not null comment '리뷰 점수',
- rating_score decimal(5, 2) not null comment '평점 점수',
- pick_score decimal(5, 2) not null comment '찜하기 점수',
- popular_score decimal(5, 2) not null comment '인기도 점수',
- created_at timestamp default CURRENT_TIMESTAMP null comment '생성일시',
- constraint uniq_alcohol_year_month
- unique (alcohol_id, year, month, day)
-)
- comment '술 인기도 통계 테이블' charset = utf8mb4;
-
-create table popularity_table
-(
- alcohol_id int not null
- primary key,
- review_score float null,
- rating_score float null,
- pick_score float null,
- popularity_score float null
-);
-
-CREATE TABLE `user_report`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '유저 신고',
- `user_id` bigint NOT NULL COMMENT '신고자',
- `report_user_id` bigint NOT NULL COMMENT '신고 대상자',
- `type` varchar(255) NOT NULL COMMENT '악성유저 ,스팸등 신고의 타입',
- `report_content` varchar(255) NOT NULL COMMENT '어던 문제로 신고했는지.',
- `status` varchar(255) NOT NULL DEFAULT 'WAITING' COMMENT '진행상태',
- `admin_id` bigint NULL COMMENT '처리 어드민',
- `response_content` varchar(255) NULL COMMENT '처리 결과',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- FOREIGN KEY (`report_user_id`) REFERENCES `users` (`id`)
- -- 복합 유니크 UNIQUE KEY `user_id_report_user` (`user_id`, `report_user`)
-) COMMENT = '유저 신고';
-
-CREATE TABLE `rating`
-(
- `alcohol_id` bigint NOT NULL COMMENT '평가 대상 술',
- `user_id` bigint NOT NULL COMMENT '평가자(사용자)',
- `rating` DOUBLE NOT NULL DEFAULT 0 COMMENT '0점 : 삭제, 0.5:최저점수, 5:최고점수',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`alcohol_id`, `user_id`),
- foreign key (`alcohol_id`) references `alcohol` (`id`),
- foreign key (`user_id`) references `users` (`id`)
-) COMMENT = '술 평점';
-
-CREATE TABLE `help`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '문의',
- `user_id` bigint NOT NULL COMMENT '문의자',
- `type` varchar(255) NOT NULL COMMENT 'ADD , USER... 개발때 enum 추가',
- `help_content` text NOT NULL COMMENT '문의내용 최대 1000글자',
- `status` varchar(255) NOT NULL DEFAULT 'WAITING' COMMENT '진행상태',
- `admin_id` bigint NULL COMMENT '처리 어드민',
- `response_content` varchar(255) NULL COMMENT 'WAITING : 대기중, SSUCCESS : 처리 완료 , REJECT : 반려',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
-) COMMENT = '문의';
-
-CREATE TABLE `help_image`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '리뷰-이미지 등록은 최대 5장',
- `help_id` bigint NOT NULL comment '문의글 아이디',
- `order` bigint NOT NULL COMMENT '이미지 순서',
- `image_url` varchar(255) NOT NULL COMMENT 'S3 이미지 경로',
- `image_key` varchar(255) NOT NULL COMMENT '업로드된 루트 경로(버킷부터 이미지 이름까지)',
- `image_path` varchar(255) NOT NULL COMMENT '져장된 이미지의 경로(버킷부터 최종폴더까지)',
- `image_name` varchar(255) NOT NULL COMMENT '생성된 UUID + 확장자 파일명',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`help_id`) REFERENCES `help` (`id`)
-) COMMENT = '문의-이미지 등록은 최대 5장';
-
-CREATE TABLE `follow`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '팔로우',
- `user_id` bigint NOT NULL COMMENT '팔로우 하는 사람 아이디',
- `follow_user_id` bigint NOT NULL COMMENT '팔로우 대상 아이디',
- `status` varchar(255) NOT NULL COMMENT '팔로우, 언팔로우',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- FOREIGN KEY (`follow_user_id`) REFERENCES `users` (`id`)
--- 복합 유니크 UNIQUE KEY `user_id_follow_user_id` (`user_id`, `follow_user_id`)
-) COMMENT = '팔로우';
-
-CREATE TABLE `tasting_tag`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '테이스팅 태그',
- `kor_name` varchar(255) NOT NULL COMMENT '한글 태그 이름',
- `eng_name` varchar(255) NOT NULL COMMENT '영문 태그 이름',
- `icon` varchar(255) NULL COMMENT '앱 출시 후 디벨롭 할 때 사용',
- `description` varchar(255) NULL COMMENT '태그 설명',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`)
-) COMMENT = '테이스팅 태그';
-
-CREATE TABLE `alcohol_tasting_tags`
-(
- `id` bigint NOT NULL comment '술/테이스팅 태그 연관관계 해소',
- `alcohol_id` bigint NOT NULL comment '술 아이디',
- `tasting_tag_id` bigint NOT NULL comment '태그 아이디',
- `create_at` timestamp NULL comment '최초 생성일',
- `last_modify_at` timestamp NULL comment '최종 생성일',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`alcohol_id`) REFERENCES `alcohol` (`id`),
- FOREIGN KEY (`tasting_tag_id`) REFERENCES `tasting_tag` (`id`)
-) COMMENT = '술/테이스팅 태그 연관관계 해소';
-
-CREATE TABLE `review`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '술 리뷰',
- `user_id` bigint NOT NULL COMMENT '리뷰 작성자',
- `alcohol_id` bigint NOT NULL COMMENT '리뷰 대상 술',
- `is_best` boolean NOT NULL DEFAULT FALSE COMMENT '베스트 리뷰 여부',
- `review_rating` double default 0 null comment '0점 : 삭제, 0.5:최저점수, 5:최고점수',
- `content` varchar(1000) NOT NULL COMMENT '1000글자',
- `size_type` varchar(255) NULL COMMENT '잔 : GLASS , 보틀 : BOTTLE',
- `price` decimal(38, 2) NULL COMMENT '가격',
- `location_name` varchar(255) NULL COMMENT '상호 명',
- `zip_code` varchar(5) NULL COMMENT '우편번호',
- `address` varchar(255) NULL COMMENT '주소',
- `detail_address` varchar(255) NULL COMMENT '상세주소',
- `category` varchar(255) NULL COMMENT '장소 카테고리',
- `map_url` varchar(255) NULL COMMENT '지도 URL',
- `latitude` varchar(255) NULL COMMENT '위도 (x좌표)',
- `longitude` varchar(255) NULL COMMENT '경도 (y좌표)',
- `status` varchar(255) NULL COMMENT '리뷰 상태',
- `image_url` varchar(255) NULL COMMENT '썸네일 이미지',
- `view_count` bigint NULL COMMENT '조회수',
- `active_status` varchar(255) NULL COMMENT '리뷰활성상태 (활성, 삭제, 비활성)',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- FOREIGN KEY (`alcohol_id`) REFERENCES `alcohol` (`id`)
-) COMMENT = '술 리뷰';
-
-CREATE TABLE `review_report`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '리뷰 신고',
- `user_id` bigint NOT NULL COMMENT '신고자',
- `review_id` bigint NOT NULL COMMENT '신고 대상 리뷰',
- `type` varchar(255) NOT NULL COMMENT '광고 리뷰인지, 욕설 리뷰인지등의 타입',
- `report_content` varchar(255) NOT NULL COMMENT '어떤 문제로 신고했는지.',
- `status` varchar(255) NOT NULL DEFAULT 'WAITING' COMMENT '진행상태',
- `ip_address` varchar(255) NOT NULL COMMENT '신고자 IP',
- `admin_id` bigint NULL COMMENT '처리 어드민',
- `response_content` varchar(255) NULL COMMENT '처리 결과',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- FOREIGN KEY (`review_id`) REFERENCES `review` (`id`)
-) COMMENT = '리뷰 신고';
-
-CREATE TABLE `review_image`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '리뷰-이미지 등록은 최대 5장',
- `review_id` bigint NOT NULL comment '리뷰 아이디',
- `order` bigint NOT NULL COMMENT '이미지 순서',
- `image_url` varchar(255) NOT NULL COMMENT 'S3 이미지 경로',
- `image_key` varchar(255) NOT NULL COMMENT '업로드된 루트 경로(버킷부터 이미지 이름까지)',
- `image_path` varchar(255) NOT NULL COMMENT '져장된 이미지의 경로(버킷부터 최종폴더까지)',
- `image_name` varchar(255) NOT NULL COMMENT '생성된 UUID + 확장자 파일명',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`review_id`) REFERENCES `review` (`id`)
-) COMMENT = '리뷰-이미지 등록은 최대 5장';
-
-CREATE TABLE `review_tasting_tag`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '리뷰 테이스팅 태그 - 최대 10개',
- `review_id` bigint NOT NULL comment '리뷰 아이디',
- `tasting_tag` varchar(12) NOT NULL COMMENT '테이스팅 태그 - 최대 12자',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`review_id`) REFERENCES `review` (`id`)
-) COMMENT = '리뷰 테이스팅 태그';
-
-CREATE TABLE `review_reply`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '리뷰 댓글',
- `review_id` bigint NOT NULL COMMENT '리뷰 아이디',
- `user_id` bigint NOT NULL COMMENT '리뷰 작성자',
- `status` varchar(255) NULL COMMENT '리뷰 댓글의 현재 상태',
- `root_reply_id` bigint NULL comment '최상위 댓글 식별자',
- `parent_reply_id` bigint NULL comment '상위 댓글 식별',
- `content` text NOT NULL COMMENT '댓글 최대 1000글자',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`review_id`) REFERENCES `review` (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
- foreign key (`root_reply_id`) references `review_reply` (`id`),
- FOREIGN KEY (`parent_reply_id`) REFERENCES `review_reply` (`id`)
-) COMMENT = '리뷰 댓글';
-
-CREATE TABLE `notice`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '공지사항',
- `title` varchar(255) NULL COMMENT '공지사항 제목',
- `category` varchar(255) NULL COMMENT '공지사항 카테고리',
- `content` text NULL COMMENT '공지사항 내용 최대 1000',
- `view_count` bigint NULL COMMENT '조회수',
- `admin_id` bigint NULL COMMENT '추후 어드민 역할 추가 후',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`)
-) COMMENT = '공지사항';
-
-CREATE TABLE `likes`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '좋아요',
- `review_id` bigint NOT NULL COMMENT '좋아요의 대상 리뷰',
- `user_id` bigint NOT NULL COMMENT '좋아요를 누른 사용자 식별자',
- `user_nick_name` varchar(255) NOT NULL COMMENT '좋아요를 누른 사용자 닉네임',
- `status` varchar(255) NULL COMMENT '공감, 공감취소',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`review_id`) REFERENCES `review` (`id`),
- FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
-) COMMENT = '좋아요';
-
-CREATE TABLE `alcohol_image`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '술 이미지',
- `alcohol_id` bigint NOT NULL COMMENT '술 아이디',
- `order` bigint NOT NULL COMMENT '이미지 순서',
- `image_url` varchar(255) NOT NULL COMMENT 'S3 이미지 경로',
- `image_key` varchar(255) NOT NULL COMMENT '업로드된 루트 경로(버킷부터 이미지 이름까지)',
- `image_path` varchar(255) NOT NULL COMMENT '져장된 이미지의 경로(버킷부터 최종폴더까지)',
- `image_name` varchar(255) NOT NULL COMMENT '생성된 UUID + 확장자 파일명',
- `create_at` timestamp NULL COMMENT '최초 생성일',
- `create_by` varchar(255) NULL COMMENT '최초 생성자',
- `last_modify_at` timestamp NULL COMMENT '최종 생성일',
- `last_modify_by` varchar(255) NULL COMMENT '최종 생성자',
- PRIMARY KEY (`id`),
- FOREIGN KEY (`alcohol_id`) REFERENCES `alcohol` (`id`)
-) COMMENT = '술 이미지';
-
-create table user_history
-(
- id bigint not null AUTO_INCREMENT comment '히스토리 id',
- user_id bigint not null comment '사용자 id',
- event_category varchar(255) not null comment 'pick, review, rating',
- event_type varchar(255) null comment 'isPick,unPick || like, create, review, best || start, update, delete',
- redirect_url varchar(255) null comment '발생되는 api의 도메인주소를 뺀 url',
- image_url varchar(255) null comment '발생되는 api의 도메인주소를 뺀 url',
- alcohol_id bigint null comment '알코올 이름(한글)',
- content varchar(255) null comment '히스토리 컨텐츠',
- dynamic_message json null comment '가변데이터(현재는 별점에서만 사용)',
- event_year varchar(255) null comment '발생 년(YYYY)',
- event_month varchar(255) null comment '발생 월(MM)',
- create_at timestamp null,
- create_by varchar(255) null,
- last_modify_at timestamp null comment '최종 생성일',
- last_modify_by varchar(255) null comment '최종 생성자',
- PRIMARY KEY (`id`),
- constraint user_history_ibfk_1
- foreign key (user_id) references users (id)
-)
- comment '유저 히스토리';
-
-create index user_id
- on user_history (user_id);
-
-create table notification
-(
- id bigint auto_increment primary key,
- user_id bigint not null comment '사용자 id',
- title varchar(255) not null comment '알림 제목',
- content text not null comment '알림 내용',
- type varchar(255) not null comment '알림 타입 (SYSTEM: 시스템 알림, USER: 사용자 알림, PROMOTION: 프로모션 알림)',
- category varchar(255) not null comment '알림의 종류 ( 리뷰, 댓글, 팔로우, 좋아요, 프로모션 )',
- status varchar(255) not null comment '알림 상태 (PENDING: 대기 중, SENT: 전송됨, READ: 읽음, FAILED: 실패)',
- is_read boolean not null comment '읽음 여부',
- create_at timestamp default now() comment '최초 생성일',
- create_by varchar(255) null comment '최초 생성자',
- last_modify_at timestamp default now() comment '최종 수정일',
- last_modify_by varchar(255) null comment '최종 수정자',
- constraint notification_users_id_fk
- foreign key (user_id) references users (id)
-) comment = '사용자 알림';
-
-CREATE TABLE user_device_token
-(
- id BIGINT AUTO_INCREMENT COMMENT '사용자 디바이스 토큰 아이디',
- user_id BIGINT COMMENT '사용자 아이디',
- device_token VARCHAR(255) COMMENT '디바이스 토큰',
- platform VARCHAR(255) DEFAULT 'ANDROID' COMMENT '플랫폼 (ANDROID, IOS)',
- create_at TIMESTAMP DEFAULT NOW() COMMENT '생성일시',
- last_modify_at TIMESTAMP DEFAULT NOW() COMMENT '수정일시',
- FOREIGN KEY (user_id) REFERENCES users (id),
- UNIQUE (user_id, device_token),
- PRIMARY KEY (id)
-) COMMENT = '사용자 디바이스 토큰 테이블';
-
-
-create table user_push_config
-(
- user_id bigint not null,
- event boolean not null,
- promotion boolean not null,
- follower boolean not null,
- review boolean not null,
- night boolean not null,
- primary key (user_id)
-) comment '사용자 푸시 설정';