Skip to content

Commit

Permalink
H2DbRepositoryAbstract 생성하기
Browse files Browse the repository at this point in the history
Related to: #37
  • Loading branch information
ahyoon99 committed Aug 13, 2024
1 parent 7842b97 commit a7be8a8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.example.naverrestaurant.wishlist.repository;

import com.example.naverrestaurant.db.H2DbRepositoryAbstract;
import com.example.naverrestaurant.db.MemoryDbRepositoryAbstract;
import com.example.naverrestaurant.db.MemoryDbRepositoryIfs;
import com.example.naverrestaurant.wishlist.entity.WishListEntity;
import org.springframework.stereotype.Repository;

@Repository
public class WishListRepository extends MemoryDbRepositoryAbstract<WishListEntity> {
public class WishListRepository extends H2DbRepositoryAbstract<WishListEntity> {
}
//public class WishListRepository extends MemoryDbRepositoryAbstract<WishListEntity> {
//}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.naverrestaurant.wishlist.service;

import com.example.naverrestaurant.db.MemoryDbEntity;
import com.example.naverrestaurant.naver.NaverClient;
import com.example.naverrestaurant.naver.dto.SearchImageReq;
import com.example.naverrestaurant.naver.dto.SearchLocalReq;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/h2/data.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
insert into RESTAURANT(title, category, address, roadAddress, homepageLink, imageLink, isVisit, visitCount, lastVisitDate) VALUES ('전주 마라탕', '중식', '전주시 만성동1', '만성로1', 'www.maratang.com', 'www.pic1.jpeg','f',0,null);
insert into RESTAURANT(title, category, address, roadAddress, homepageLink, imageLink, isVisit, visitCount, lastVisitDate) VALUES ('만성 찜닭', '한식', '전주시 만성동2', '만성로2', 'www.zzimdak.com', 'www.pic2.jpeg','f',0,null);
insert into RESTAURANT(title, category, address, roadAddress, homepageLink, imageLink, isVisit, visitCount, lastVisitDate) VALUES ('전주 마라탕2', '중식', '전주시 만성동1', '만성로1', 'www.maratang.com', 'www.pic1.jpeg',FALSE,0,'2023-08-10 11:28:36.026095');
insert into RESTAURANT(title, category, address, roadAddress, homepageLink, imageLink, isVisit, visitCount, lastVisitDate) VALUES ('만성 찜닭2', '한식', '전주시 만성동2', '만성로2', 'www.zzimdak.com', 'www.pic2.jpeg',TRUE,0,'2024-08-12 11:28:36.026095');
2 changes: 1 addition & 1 deletion src/main/resources/h2/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE RESTAURANT
roadAddress VARCHAR(255), -- 도로명 주소
homePageLink VARCHAR(255), -- 홈페이지 주소
imageLink VARCHAR(255), -- 음식, 가게 이미지 주소
isVisit VARCHAR(1) NOT NULL, -- 방문 여부
isVisit BOOLEAN NOT NULL, -- 방문 여부
visitCount INTEGER NOT NULL, -- 방문 횟수
lastVisitDate TIMESTAMP -- 마지막 방문 날짜
);

0 comments on commit a7be8a8

Please sign in to comment.