Skip to content

Commit

Permalink
feat: 신규상점 생성시 기본 카테고리 추가 (#331)
Browse files Browse the repository at this point in the history
* fix: @param추가

* feat: 신규 상점 생성 시 기본 메뉴 카테고리 추가

* chore: 라인포맷팅

---------

Co-authored-by: HyeonsuLee <leehyeonsu4888@naver.com>
(cherry picked from commit fbef5d0)
  • Loading branch information
20HyeonsuLee authored and Choi-JJunho committed May 9, 2024
1 parent 50b82c7 commit 21ebce5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public void createOwnerShops(Long ownerId, OwnerShopsRequest ownerShopsRequest)
Owner owner = ownerRepository.getById(ownerId);
Shop newShop = ownerShopsRequest.toEntity(owner);
Shop savedShop = shopRepository.save(newShop);

List<String> categoryNames = List.of("추천 메뉴", "메인 메뉴", "세트 메뉴", "사이드 메뉴");
for (String categoryName : categoryNames) {
MenuCategory menuCategory = MenuCategory.builder()
.shop(savedShop)
.name(categoryName)
.build();
menuCategoryRepository.save(menuCategory);
}
for (String imageUrl : ownerShopsRequest.imageUrls()) {
ShopImage shopImage = ShopImage.builder()
.shop(savedShop)
Expand Down

0 comments on commit 21ebce5

Please sign in to comment.