From 9969429d6fe62a218e49847316564c302e6d2599 Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 13:05:21 +0900 Subject: [PATCH 1/7] refactor: separate repository subpackage from domain package --- .../java/kitchenpos/application/MenuGroupService.java | 2 +- src/main/java/kitchenpos/application/MenuService.java | 10 +++++----- src/main/java/kitchenpos/application/OrderService.java | 10 +++++----- .../java/kitchenpos/application/ProductService.java | 2 +- .../java/kitchenpos/application/TableGroupService.java | 6 +++--- src/main/java/kitchenpos/application/TableService.java | 4 ++-- .../menu}/MenuGroupRepository.java | 2 +- .../menu}/MenuHistoryRepository.java | 2 +- .../menu}/MenuProductRepository.java | 2 +- .../repository => repository/menu}/MenuRepository.java | 2 +- .../menu}/ProductRepository.java | 2 +- .../order}/OrderLineItemRepository.java | 2 +- .../order}/OrderRepository.java | 2 +- .../table}/OrderTableRepository.java | 2 +- .../table}/TableGroupRepository.java | 2 +- .../kitchenpos/application/TableGroupServiceTest.java | 2 +- .../repository/MenuHistoryRepositoryTest.java | 6 +++--- 17 files changed, 30 insertions(+), 30 deletions(-) rename src/main/java/kitchenpos/{domain/menu/repository => repository/menu}/MenuGroupRepository.java (87%) rename src/main/java/kitchenpos/{domain/menu/repository => repository/menu}/MenuHistoryRepository.java (93%) rename src/main/java/kitchenpos/{domain/menu/repository => repository/menu}/MenuProductRepository.java (88%) rename src/main/java/kitchenpos/{domain/menu/repository => repository/menu}/MenuRepository.java (92%) rename src/main/java/kitchenpos/{domain/menu/repository => repository/menu}/ProductRepository.java (91%) rename src/main/java/kitchenpos/{domain/order/repository => repository/order}/OrderLineItemRepository.java (88%) rename src/main/java/kitchenpos/{domain/order/repository => repository/order}/OrderRepository.java (94%) rename src/main/java/kitchenpos/{domain/table/repository => repository/table}/OrderTableRepository.java (93%) rename src/main/java/kitchenpos/{domain/table/repository => repository/table}/TableGroupRepository.java (86%) rename src/test/java/kitchenpos/{domain => }/repository/MenuHistoryRepositoryTest.java (89%) diff --git a/src/main/java/kitchenpos/application/MenuGroupService.java b/src/main/java/kitchenpos/application/MenuGroupService.java index 36993cc0cb..8d62cd4cef 100644 --- a/src/main/java/kitchenpos/application/MenuGroupService.java +++ b/src/main/java/kitchenpos/application/MenuGroupService.java @@ -4,7 +4,7 @@ import kitchenpos.application.dto.request.CreateMenuGroupDto; import kitchenpos.application.dto.response.MenuGroupDto; import kitchenpos.domain.menu.MenuGroup; -import kitchenpos.domain.menu.repository.MenuGroupRepository; +import kitchenpos.repository.menu.MenuGroupRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/MenuService.java b/src/main/java/kitchenpos/application/MenuService.java index 7d44c7e315..16af4043a8 100644 --- a/src/main/java/kitchenpos/application/MenuService.java +++ b/src/main/java/kitchenpos/application/MenuService.java @@ -8,13 +8,13 @@ import kitchenpos.domain.menu.MenuHistory; import kitchenpos.domain.menu.MenuProduct; import kitchenpos.domain.menu.ProductQuantities; -import kitchenpos.domain.menu.repository.MenuGroupRepository; -import kitchenpos.domain.menu.repository.MenuHistoryRepository; -import kitchenpos.domain.menu.repository.MenuProductRepository; -import kitchenpos.domain.menu.repository.MenuRepository; +import kitchenpos.repository.menu.MenuGroupRepository; +import kitchenpos.repository.menu.MenuHistoryRepository; +import kitchenpos.repository.menu.MenuProductRepository; +import kitchenpos.repository.menu.MenuRepository; import kitchenpos.domain.menu.Menu; import kitchenpos.domain.menu.ProductQuantity; -import kitchenpos.domain.menu.repository.ProductRepository; +import kitchenpos.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/OrderService.java b/src/main/java/kitchenpos/application/OrderService.java index 66584f1fe2..30d9749d17 100644 --- a/src/main/java/kitchenpos/application/OrderService.java +++ b/src/main/java/kitchenpos/application/OrderService.java @@ -7,13 +7,13 @@ import kitchenpos.application.dto.request.UpdateOrderStatusDto; import kitchenpos.domain.menu.Menu; import kitchenpos.domain.menu.MenuHistory; -import kitchenpos.domain.menu.repository.MenuHistoryRepository; -import kitchenpos.domain.menu.repository.MenuRepository; +import kitchenpos.repository.menu.MenuHistoryRepository; +import kitchenpos.repository.menu.MenuRepository; import kitchenpos.domain.order.Order; import kitchenpos.domain.order.OrderLineItem; -import kitchenpos.domain.order.repository.OrderLineItemRepository; -import kitchenpos.domain.order.repository.OrderRepository; -import kitchenpos.domain.table.repository.OrderTableRepository; +import kitchenpos.repository.order.OrderLineItemRepository; +import kitchenpos.repository.order.OrderRepository; +import kitchenpos.repository.table.OrderTableRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; diff --git a/src/main/java/kitchenpos/application/ProductService.java b/src/main/java/kitchenpos/application/ProductService.java index f5d9c4635b..8ee0be93e3 100644 --- a/src/main/java/kitchenpos/application/ProductService.java +++ b/src/main/java/kitchenpos/application/ProductService.java @@ -4,7 +4,7 @@ import kitchenpos.application.dto.request.CreateProductDto; import kitchenpos.application.dto.response.ProductDto; import kitchenpos.domain.menu.Product; -import kitchenpos.domain.menu.repository.ProductRepository; +import kitchenpos.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/TableGroupService.java b/src/main/java/kitchenpos/application/TableGroupService.java index 3ffc51bf01..723dfd3fdb 100644 --- a/src/main/java/kitchenpos/application/TableGroupService.java +++ b/src/main/java/kitchenpos/application/TableGroupService.java @@ -3,9 +3,9 @@ import kitchenpos.application.dto.request.CreateTableGroupDto; import kitchenpos.application.dto.response.TableGroupDto; import kitchenpos.domain.order.OrderStatus; -import kitchenpos.domain.order.repository.OrderRepository; -import kitchenpos.domain.table.repository.OrderTableRepository; -import kitchenpos.domain.table.repository.TableGroupRepository; +import kitchenpos.repository.order.OrderRepository; +import kitchenpos.repository.table.OrderTableRepository; +import kitchenpos.repository.table.TableGroupRepository; import kitchenpos.domain.table.OrderTable; import kitchenpos.domain.table.OrderTables; import kitchenpos.domain.table.TableGroup; diff --git a/src/main/java/kitchenpos/application/TableService.java b/src/main/java/kitchenpos/application/TableService.java index b1b6642230..3c9f9b117b 100644 --- a/src/main/java/kitchenpos/application/TableService.java +++ b/src/main/java/kitchenpos/application/TableService.java @@ -6,8 +6,8 @@ import kitchenpos.application.dto.response.TableDto; import kitchenpos.application.dto.request.UpdateGuestNumberDto; import kitchenpos.domain.order.OrderStatus; -import kitchenpos.domain.order.repository.OrderRepository; -import kitchenpos.domain.table.repository.OrderTableRepository; +import kitchenpos.repository.order.OrderRepository; +import kitchenpos.repository.table.OrderTableRepository; import kitchenpos.domain.table.OrderTable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/domain/menu/repository/MenuGroupRepository.java b/src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java similarity index 87% rename from src/main/java/kitchenpos/domain/menu/repository/MenuGroupRepository.java rename to src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java index 0b50a4fd25..a2ce555712 100644 --- a/src/main/java/kitchenpos/domain/menu/repository/MenuGroupRepository.java +++ b/src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu.repository; +package kitchenpos.repository.menu; import java.util.List; import kitchenpos.domain.menu.MenuGroup; diff --git a/src/main/java/kitchenpos/domain/menu/repository/MenuHistoryRepository.java b/src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java similarity index 93% rename from src/main/java/kitchenpos/domain/menu/repository/MenuHistoryRepository.java rename to src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java index 3faa320d77..e8f4008052 100644 --- a/src/main/java/kitchenpos/domain/menu/repository/MenuHistoryRepository.java +++ b/src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu.repository; +package kitchenpos.repository.menu; import java.util.Optional; import kitchenpos.domain.menu.Menu; diff --git a/src/main/java/kitchenpos/domain/menu/repository/MenuProductRepository.java b/src/main/java/kitchenpos/repository/menu/MenuProductRepository.java similarity index 88% rename from src/main/java/kitchenpos/domain/menu/repository/MenuProductRepository.java rename to src/main/java/kitchenpos/repository/menu/MenuProductRepository.java index f70ee0c66f..ce59f30348 100644 --- a/src/main/java/kitchenpos/domain/menu/repository/MenuProductRepository.java +++ b/src/main/java/kitchenpos/repository/menu/MenuProductRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu.repository; +package kitchenpos.repository.menu; import java.util.List; import kitchenpos.domain.menu.MenuProduct; diff --git a/src/main/java/kitchenpos/domain/menu/repository/MenuRepository.java b/src/main/java/kitchenpos/repository/menu/MenuRepository.java similarity index 92% rename from src/main/java/kitchenpos/domain/menu/repository/MenuRepository.java rename to src/main/java/kitchenpos/repository/menu/MenuRepository.java index 5adf037db1..c0fecef823 100644 --- a/src/main/java/kitchenpos/domain/menu/repository/MenuRepository.java +++ b/src/main/java/kitchenpos/repository/menu/MenuRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu.repository; +package kitchenpos.repository.menu; import java.util.List; import java.util.Optional; diff --git a/src/main/java/kitchenpos/domain/menu/repository/ProductRepository.java b/src/main/java/kitchenpos/repository/menu/ProductRepository.java similarity index 91% rename from src/main/java/kitchenpos/domain/menu/repository/ProductRepository.java rename to src/main/java/kitchenpos/repository/menu/ProductRepository.java index d5869ed4fc..1c928a3493 100644 --- a/src/main/java/kitchenpos/domain/menu/repository/ProductRepository.java +++ b/src/main/java/kitchenpos/repository/menu/ProductRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu.repository; +package kitchenpos.repository.menu; import java.util.List; import java.util.Optional; diff --git a/src/main/java/kitchenpos/domain/order/repository/OrderLineItemRepository.java b/src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java similarity index 88% rename from src/main/java/kitchenpos/domain/order/repository/OrderLineItemRepository.java rename to src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java index c13ff90e84..be8d3db78e 100644 --- a/src/main/java/kitchenpos/domain/order/repository/OrderLineItemRepository.java +++ b/src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.order.repository; +package kitchenpos.repository.order; import java.util.List; import kitchenpos.domain.order.OrderLineItem; diff --git a/src/main/java/kitchenpos/domain/order/repository/OrderRepository.java b/src/main/java/kitchenpos/repository/order/OrderRepository.java similarity index 94% rename from src/main/java/kitchenpos/domain/order/repository/OrderRepository.java rename to src/main/java/kitchenpos/repository/order/OrderRepository.java index 07e73ff16d..560441cbd0 100644 --- a/src/main/java/kitchenpos/domain/order/repository/OrderRepository.java +++ b/src/main/java/kitchenpos/repository/order/OrderRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.order.repository; +package kitchenpos.repository.order; import java.util.List; import java.util.Optional; diff --git a/src/main/java/kitchenpos/domain/table/repository/OrderTableRepository.java b/src/main/java/kitchenpos/repository/table/OrderTableRepository.java similarity index 93% rename from src/main/java/kitchenpos/domain/table/repository/OrderTableRepository.java rename to src/main/java/kitchenpos/repository/table/OrderTableRepository.java index cf29ced979..ef861405fc 100644 --- a/src/main/java/kitchenpos/domain/table/repository/OrderTableRepository.java +++ b/src/main/java/kitchenpos/repository/table/OrderTableRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table.repository; +package kitchenpos.repository.table; import java.util.List; import java.util.Optional; diff --git a/src/main/java/kitchenpos/domain/table/repository/TableGroupRepository.java b/src/main/java/kitchenpos/repository/table/TableGroupRepository.java similarity index 86% rename from src/main/java/kitchenpos/domain/table/repository/TableGroupRepository.java rename to src/main/java/kitchenpos/repository/table/TableGroupRepository.java index bfb0d5a98f..ac5b872cfc 100644 --- a/src/main/java/kitchenpos/domain/table/repository/TableGroupRepository.java +++ b/src/main/java/kitchenpos/repository/table/TableGroupRepository.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table.repository; +package kitchenpos.repository.table; import java.util.List; import kitchenpos.domain.table.TableGroup; diff --git a/src/test/java/kitchenpos/application/TableGroupServiceTest.java b/src/test/java/kitchenpos/application/TableGroupServiceTest.java index fbad1d0ad7..d2c7ce5548 100644 --- a/src/test/java/kitchenpos/application/TableGroupServiceTest.java +++ b/src/test/java/kitchenpos/application/TableGroupServiceTest.java @@ -13,7 +13,7 @@ import kitchenpos.application.dto.request.CreateTableDto; import kitchenpos.application.dto.request.CreateTableGroupDto; import kitchenpos.application.dto.response.TableGroupDto; -import kitchenpos.domain.table.repository.OrderTableRepository; +import kitchenpos.repository.table.OrderTableRepository; import kitchenpos.domain.table.OrderTable; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/kitchenpos/domain/repository/MenuHistoryRepositoryTest.java b/src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java similarity index 89% rename from src/test/java/kitchenpos/domain/repository/MenuHistoryRepositoryTest.java rename to src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java index 39da4797f9..45ce582dbc 100644 --- a/src/test/java/kitchenpos/domain/repository/MenuHistoryRepositoryTest.java +++ b/src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.repository; +package kitchenpos.repository; import static org.assertj.core.api.Assertions.assertThat; @@ -6,8 +6,8 @@ import kitchenpos.domain.menu.Menu; import kitchenpos.domain.menu.MenuHistory; import kitchenpos.domain.menu.Price; -import kitchenpos.domain.menu.repository.MenuHistoryRepository; -import kitchenpos.domain.menu.repository.MenuRepository; +import kitchenpos.repository.menu.MenuHistoryRepository; +import kitchenpos.repository.menu.MenuRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; From 9ef9cbce69e75f9603b0da50a05cc33c02c4e4ca Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 13:53:27 +0900 Subject: [PATCH 2/7] refactor: make domain and repository subpackages of common package --- .../application/MenuGroupService.java | 4 ++-- .../kitchenpos/application/MenuService.java | 20 +++++++++---------- .../kitchenpos/application/OrderService.java | 18 ++++++++--------- .../application/ProductService.java | 4 ++-- .../application/TableGroupService.java | 14 ++++++------- .../kitchenpos/application/TableService.java | 8 ++++---- .../dto/request/CreateMenuDto.java | 4 ++-- .../dto/request/CreateProductDto.java | 2 +- .../dto/request/UpdateOrderStatusDto.java | 2 +- .../application/dto/response/MenuDto.java | 4 ++-- .../dto/response/MenuGroupDto.java | 2 +- .../dto/response/MenuProductDto.java | 2 +- .../application/dto/response/OrderDto.java | 4 ++-- .../dto/response/OrderLineItemDto.java | 2 +- .../application/dto/response/ProductDto.java | 2 +- .../application/dto/response/TableDto.java | 2 +- .../dto/response/TableGroupDto.java | 4 ++-- .../{ => common}/domain/menu/Menu.java | 2 +- .../{ => common}/domain/menu/MenuGroup.java | 2 +- .../{ => common}/domain/menu/MenuHistory.java | 2 +- .../{ => common}/domain/menu/MenuProduct.java | 2 +- .../{ => common}/domain/menu/Price.java | 3 +-- .../{ => common}/domain/menu/Product.java | 2 +- .../domain/menu/ProductQuantities.java | 2 +- .../domain/menu/ProductQuantity.java | 2 +- .../{ => common}/domain/order/Order.java | 4 ++-- .../domain/order/OrderLineItem.java | 4 ++-- .../domain/order/OrderStatus.java | 2 +- .../{ => common}/domain/table/OrderTable.java | 2 +- .../domain/table/OrderTables.java | 2 +- .../{ => common}/domain/table/TableGroup.java | 2 +- .../repository/menu/MenuGroupRepository.java | 4 ++-- .../menu/MenuHistoryRepository.java | 6 +++--- .../menu/MenuProductRepository.java | 4 ++-- .../repository/menu/MenuRepository.java | 4 ++-- .../repository/menu/ProductRepository.java | 4 ++-- .../order/OrderLineItemRepository.java | 4 ++-- .../repository/order/OrderRepository.java | 6 +++--- .../table/OrderTableRepository.java | 4 ++-- .../table/TableGroupRepository.java | 4 ++-- .../ui/MenuGroupRestController.java | 1 - .../kitchenpos/ui/ProductRestController.java | 1 - .../ui/dto/OrderStatusRequestDto.java | 2 +- .../application/MenuGroupServiceTest.java | 1 - .../application/OrderServiceTest.java | 2 +- .../application/ProductServiceTest.java | 1 - .../application/TableGroupServiceTest.java | 4 ++-- .../domain/menu/MenuGroupTest.java | 2 +- .../{ => common}/domain/menu/MenuTest.java | 2 +- .../{ => common}/domain/menu/PriceTest.java | 3 +-- .../{ => common}/domain/menu/ProductTest.java | 3 +-- .../{ => common}/domain/order/OrderTest.java | 4 ++-- .../domain/table/OrderTableTest.java | 2 +- .../domain/table/OrderTablesTest.java | 2 +- .../repository/MenuHistoryRepositoryTest.java | 12 +++++------ 55 files changed, 103 insertions(+), 110 deletions(-) rename src/main/java/kitchenpos/{ => common}/domain/menu/Menu.java (97%) rename src/main/java/kitchenpos/{ => common}/domain/menu/MenuGroup.java (95%) rename src/main/java/kitchenpos/{ => common}/domain/menu/MenuHistory.java (97%) rename src/main/java/kitchenpos/{ => common}/domain/menu/MenuProduct.java (96%) rename src/main/java/kitchenpos/{ => common}/domain/menu/Price.java (93%) rename src/main/java/kitchenpos/{ => common}/domain/menu/Product.java (96%) rename src/main/java/kitchenpos/{ => common}/domain/menu/ProductQuantities.java (94%) rename src/main/java/kitchenpos/{ => common}/domain/menu/ProductQuantity.java (93%) rename src/main/java/kitchenpos/{ => common}/domain/order/Order.java (95%) rename src/main/java/kitchenpos/{ => common}/domain/order/OrderLineItem.java (92%) rename src/main/java/kitchenpos/{ => common}/domain/order/OrderStatus.java (84%) rename src/main/java/kitchenpos/{ => common}/domain/table/OrderTable.java (97%) rename src/main/java/kitchenpos/{ => common}/domain/table/OrderTables.java (96%) rename src/main/java/kitchenpos/{ => common}/domain/table/TableGroup.java (94%) rename src/main/java/kitchenpos/{ => common}/repository/menu/MenuGroupRepository.java (74%) rename src/main/java/kitchenpos/{ => common}/repository/menu/MenuHistoryRepository.java (79%) rename src/main/java/kitchenpos/{ => common}/repository/menu/MenuProductRepository.java (75%) rename src/main/java/kitchenpos/{ => common}/repository/menu/MenuRepository.java (84%) rename src/main/java/kitchenpos/{ => common}/repository/menu/ProductRepository.java (83%) rename src/main/java/kitchenpos/{ => common}/repository/order/OrderLineItemRepository.java (75%) rename src/main/java/kitchenpos/{ => common}/repository/order/OrderRepository.java (82%) rename src/main/java/kitchenpos/{ => common}/repository/table/OrderTableRepository.java (86%) rename src/main/java/kitchenpos/{ => common}/repository/table/TableGroupRepository.java (71%) rename src/test/java/kitchenpos/{ => common}/domain/menu/MenuGroupTest.java (91%) rename src/test/java/kitchenpos/{ => common}/domain/menu/MenuTest.java (94%) rename src/test/java/kitchenpos/{ => common}/domain/menu/PriceTest.java (88%) rename src/test/java/kitchenpos/{ => common}/domain/menu/ProductTest.java (93%) rename src/test/java/kitchenpos/{ => common}/domain/order/OrderTest.java (95%) rename src/test/java/kitchenpos/{ => common}/domain/table/OrderTableTest.java (98%) rename src/test/java/kitchenpos/{ => common}/domain/table/OrderTablesTest.java (98%) rename src/test/java/kitchenpos/{ => common}/repository/MenuHistoryRepositoryTest.java (80%) diff --git a/src/main/java/kitchenpos/application/MenuGroupService.java b/src/main/java/kitchenpos/application/MenuGroupService.java index 8d62cd4cef..c3aad3e876 100644 --- a/src/main/java/kitchenpos/application/MenuGroupService.java +++ b/src/main/java/kitchenpos/application/MenuGroupService.java @@ -3,8 +3,8 @@ import java.util.stream.Collectors; import kitchenpos.application.dto.request.CreateMenuGroupDto; import kitchenpos.application.dto.response.MenuGroupDto; -import kitchenpos.domain.menu.MenuGroup; -import kitchenpos.repository.menu.MenuGroupRepository; +import kitchenpos.common.domain.menu.MenuGroup; +import kitchenpos.common.repository.menu.MenuGroupRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/MenuService.java b/src/main/java/kitchenpos/application/MenuService.java index 16af4043a8..49db2cf321 100644 --- a/src/main/java/kitchenpos/application/MenuService.java +++ b/src/main/java/kitchenpos/application/MenuService.java @@ -5,16 +5,16 @@ import kitchenpos.application.dto.request.CreateMenuDto; import kitchenpos.application.dto.request.CreateMenuProductDto; import kitchenpos.application.dto.response.MenuDto; -import kitchenpos.domain.menu.MenuHistory; -import kitchenpos.domain.menu.MenuProduct; -import kitchenpos.domain.menu.ProductQuantities; -import kitchenpos.repository.menu.MenuGroupRepository; -import kitchenpos.repository.menu.MenuHistoryRepository; -import kitchenpos.repository.menu.MenuProductRepository; -import kitchenpos.repository.menu.MenuRepository; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.ProductQuantity; -import kitchenpos.repository.menu.ProductRepository; +import kitchenpos.common.domain.menu.MenuHistory; +import kitchenpos.common.domain.menu.MenuProduct; +import kitchenpos.common.domain.menu.ProductQuantities; +import kitchenpos.common.repository.menu.MenuGroupRepository; +import kitchenpos.common.repository.menu.MenuHistoryRepository; +import kitchenpos.common.repository.menu.MenuProductRepository; +import kitchenpos.common.repository.menu.MenuRepository; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.ProductQuantity; +import kitchenpos.common.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/OrderService.java b/src/main/java/kitchenpos/application/OrderService.java index 30d9749d17..a286c3d4e6 100644 --- a/src/main/java/kitchenpos/application/OrderService.java +++ b/src/main/java/kitchenpos/application/OrderService.java @@ -5,15 +5,15 @@ import kitchenpos.application.dto.request.CreateOrderLineItemDto; import kitchenpos.application.dto.response.OrderDto; import kitchenpos.application.dto.request.UpdateOrderStatusDto; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.MenuHistory; -import kitchenpos.repository.menu.MenuHistoryRepository; -import kitchenpos.repository.menu.MenuRepository; -import kitchenpos.domain.order.Order; -import kitchenpos.domain.order.OrderLineItem; -import kitchenpos.repository.order.OrderLineItemRepository; -import kitchenpos.repository.order.OrderRepository; -import kitchenpos.repository.table.OrderTableRepository; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.MenuHistory; +import kitchenpos.common.repository.menu.MenuHistoryRepository; +import kitchenpos.common.repository.menu.MenuRepository; +import kitchenpos.common.domain.order.Order; +import kitchenpos.common.domain.order.OrderLineItem; +import kitchenpos.common.repository.order.OrderLineItemRepository; +import kitchenpos.common.repository.order.OrderRepository; +import kitchenpos.common.repository.table.OrderTableRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; diff --git a/src/main/java/kitchenpos/application/ProductService.java b/src/main/java/kitchenpos/application/ProductService.java index 8ee0be93e3..19ab1304cc 100644 --- a/src/main/java/kitchenpos/application/ProductService.java +++ b/src/main/java/kitchenpos/application/ProductService.java @@ -3,8 +3,8 @@ import java.util.stream.Collectors; import kitchenpos.application.dto.request.CreateProductDto; import kitchenpos.application.dto.response.ProductDto; -import kitchenpos.domain.menu.Product; -import kitchenpos.repository.menu.ProductRepository; +import kitchenpos.common.domain.menu.Product; +import kitchenpos.common.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/TableGroupService.java b/src/main/java/kitchenpos/application/TableGroupService.java index 723dfd3fdb..951b84a207 100644 --- a/src/main/java/kitchenpos/application/TableGroupService.java +++ b/src/main/java/kitchenpos/application/TableGroupService.java @@ -2,13 +2,13 @@ import kitchenpos.application.dto.request.CreateTableGroupDto; import kitchenpos.application.dto.response.TableGroupDto; -import kitchenpos.domain.order.OrderStatus; -import kitchenpos.repository.order.OrderRepository; -import kitchenpos.repository.table.OrderTableRepository; -import kitchenpos.repository.table.TableGroupRepository; -import kitchenpos.domain.table.OrderTable; -import kitchenpos.domain.table.OrderTables; -import kitchenpos.domain.table.TableGroup; +import kitchenpos.common.domain.order.OrderStatus; +import kitchenpos.common.repository.order.OrderRepository; +import kitchenpos.common.repository.table.OrderTableRepository; +import kitchenpos.common.repository.table.TableGroupRepository; +import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.common.domain.table.OrderTables; +import kitchenpos.common.domain.table.TableGroup; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/TableService.java b/src/main/java/kitchenpos/application/TableService.java index 3c9f9b117b..619e4d38b1 100644 --- a/src/main/java/kitchenpos/application/TableService.java +++ b/src/main/java/kitchenpos/application/TableService.java @@ -5,10 +5,10 @@ import kitchenpos.application.dto.request.EmptyTableDto; import kitchenpos.application.dto.response.TableDto; import kitchenpos.application.dto.request.UpdateGuestNumberDto; -import kitchenpos.domain.order.OrderStatus; -import kitchenpos.repository.order.OrderRepository; -import kitchenpos.repository.table.OrderTableRepository; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.domain.order.OrderStatus; +import kitchenpos.common.repository.order.OrderRepository; +import kitchenpos.common.repository.table.OrderTableRepository; +import kitchenpos.common.domain.table.OrderTable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java b/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java index af0a488f79..67b3c062dd 100644 --- a/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java +++ b/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java @@ -2,8 +2,8 @@ import java.math.BigDecimal; import java.util.List; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.ProductQuantities; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.ProductQuantities; public class CreateMenuDto { diff --git a/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java b/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java index 7e50b39f34..7458264807 100644 --- a/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java +++ b/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java @@ -1,7 +1,7 @@ package kitchenpos.application.dto.request; import java.math.BigDecimal; -import kitchenpos.domain.menu.Product; +import kitchenpos.common.domain.menu.Product; public class CreateProductDto { diff --git a/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java b/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java index ea2a00f19f..4c807d1e4e 100644 --- a/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java +++ b/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.dto.request; -import kitchenpos.domain.order.OrderStatus; +import kitchenpos.common.domain.order.OrderStatus; public class UpdateOrderStatusDto { diff --git a/src/main/java/kitchenpos/application/dto/response/MenuDto.java b/src/main/java/kitchenpos/application/dto/response/MenuDto.java index 72aa442047..ca1f1b59a3 100644 --- a/src/main/java/kitchenpos/application/dto/response/MenuDto.java +++ b/src/main/java/kitchenpos/application/dto/response/MenuDto.java @@ -3,8 +3,8 @@ import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.MenuProduct; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.MenuProduct; public class MenuDto { diff --git a/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java b/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java index ff073acc4f..d6ce2757b4 100644 --- a/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java +++ b/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.dto.response; -import kitchenpos.domain.menu.MenuGroup; +import kitchenpos.common.domain.menu.MenuGroup; public class MenuGroupDto { diff --git a/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java b/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java index d518e4fced..72b47ef32f 100644 --- a/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java +++ b/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.dto.response; -import kitchenpos.domain.menu.MenuProduct; +import kitchenpos.common.domain.menu.MenuProduct; public class MenuProductDto { diff --git a/src/main/java/kitchenpos/application/dto/response/OrderDto.java b/src/main/java/kitchenpos/application/dto/response/OrderDto.java index d23df4b4e1..8baa3b779c 100644 --- a/src/main/java/kitchenpos/application/dto/response/OrderDto.java +++ b/src/main/java/kitchenpos/application/dto/response/OrderDto.java @@ -3,8 +3,8 @@ import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.domain.order.Order; -import kitchenpos.domain.order.OrderLineItem; +import kitchenpos.common.domain.order.Order; +import kitchenpos.common.domain.order.OrderLineItem; public class OrderDto { diff --git a/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java b/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java index 572b9f5bc1..54656386e0 100644 --- a/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java +++ b/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.dto.response; -import kitchenpos.domain.order.OrderLineItem; +import kitchenpos.common.domain.order.OrderLineItem; public class OrderLineItemDto { diff --git a/src/main/java/kitchenpos/application/dto/response/ProductDto.java b/src/main/java/kitchenpos/application/dto/response/ProductDto.java index 344c6f56a5..ead58a8047 100644 --- a/src/main/java/kitchenpos/application/dto/response/ProductDto.java +++ b/src/main/java/kitchenpos/application/dto/response/ProductDto.java @@ -1,7 +1,7 @@ package kitchenpos.application.dto.response; import java.math.BigDecimal; -import kitchenpos.domain.menu.Product; +import kitchenpos.common.domain.menu.Product; public class ProductDto { diff --git a/src/main/java/kitchenpos/application/dto/response/TableDto.java b/src/main/java/kitchenpos/application/dto/response/TableDto.java index b764b7ffd2..b7327fc14a 100644 --- a/src/main/java/kitchenpos/application/dto/response/TableDto.java +++ b/src/main/java/kitchenpos/application/dto/response/TableDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.dto.response; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.domain.table.OrderTable; public class TableDto { diff --git a/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java b/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java index 8fe35c67c6..d0a61482ef 100644 --- a/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java +++ b/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java @@ -3,8 +3,8 @@ import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.domain.table.OrderTable; -import kitchenpos.domain.table.TableGroup; +import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.common.domain.table.TableGroup; public class TableGroupDto { diff --git a/src/main/java/kitchenpos/domain/menu/Menu.java b/src/main/java/kitchenpos/common/domain/menu/Menu.java similarity index 97% rename from src/main/java/kitchenpos/domain/menu/Menu.java rename to src/main/java/kitchenpos/common/domain/menu/Menu.java index e75e6aa328..e63e16a003 100644 --- a/src/main/java/kitchenpos/domain/menu/Menu.java +++ b/src/main/java/kitchenpos/common/domain/menu/Menu.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; import javax.persistence.Column; diff --git a/src/main/java/kitchenpos/domain/menu/MenuGroup.java b/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java similarity index 95% rename from src/main/java/kitchenpos/domain/menu/MenuGroup.java rename to src/main/java/kitchenpos/common/domain/menu/MenuGroup.java index a7a8c20331..c2f9d55146 100644 --- a/src/main/java/kitchenpos/domain/menu/MenuGroup.java +++ b/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/src/main/java/kitchenpos/domain/menu/MenuHistory.java b/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java similarity index 97% rename from src/main/java/kitchenpos/domain/menu/MenuHistory.java rename to src/main/java/kitchenpos/common/domain/menu/MenuHistory.java index 719a1098d6..577129ebfb 100644 --- a/src/main/java/kitchenpos/domain/menu/MenuHistory.java +++ b/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/src/main/java/kitchenpos/domain/menu/MenuProduct.java b/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java similarity index 96% rename from src/main/java/kitchenpos/domain/menu/MenuProduct.java rename to src/main/java/kitchenpos/common/domain/menu/MenuProduct.java index 8fad583b4c..0e53939f65 100644 --- a/src/main/java/kitchenpos/domain/menu/MenuProduct.java +++ b/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/src/main/java/kitchenpos/domain/menu/Price.java b/src/main/java/kitchenpos/common/domain/menu/Price.java similarity index 93% rename from src/main/java/kitchenpos/domain/menu/Price.java rename to src/main/java/kitchenpos/common/domain/menu/Price.java index 4e867de8bd..b49f3d8f0d 100644 --- a/src/main/java/kitchenpos/domain/menu/Price.java +++ b/src/main/java/kitchenpos/common/domain/menu/Price.java @@ -1,7 +1,6 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; -import java.util.List; import javax.persistence.Column; import javax.persistence.Embeddable; diff --git a/src/main/java/kitchenpos/domain/menu/Product.java b/src/main/java/kitchenpos/common/domain/menu/Product.java similarity index 96% rename from src/main/java/kitchenpos/domain/menu/Product.java rename to src/main/java/kitchenpos/common/domain/menu/Product.java index 04cddaf77f..83eee310d1 100644 --- a/src/main/java/kitchenpos/domain/menu/Product.java +++ b/src/main/java/kitchenpos/common/domain/menu/Product.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; import javax.persistence.Column; diff --git a/src/main/java/kitchenpos/domain/menu/ProductQuantities.java b/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java similarity index 94% rename from src/main/java/kitchenpos/domain/menu/ProductQuantities.java rename to src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java index b854be899f..7a20ae49c2 100644 --- a/src/main/java/kitchenpos/domain/menu/ProductQuantities.java +++ b/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; import java.util.List; diff --git a/src/main/java/kitchenpos/domain/menu/ProductQuantity.java b/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java similarity index 93% rename from src/main/java/kitchenpos/domain/menu/ProductQuantity.java rename to src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java index 3c4ff272d5..b8b54ff342 100644 --- a/src/main/java/kitchenpos/domain/menu/ProductQuantity.java +++ b/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import java.math.BigDecimal; diff --git a/src/main/java/kitchenpos/domain/order/Order.java b/src/main/java/kitchenpos/common/domain/order/Order.java similarity index 95% rename from src/main/java/kitchenpos/domain/order/Order.java rename to src/main/java/kitchenpos/common/domain/order/Order.java index f23b6ec268..66b0364b27 100644 --- a/src/main/java/kitchenpos/domain/order/Order.java +++ b/src/main/java/kitchenpos/common/domain/order/Order.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.order; +package kitchenpos.common.domain.order; import java.time.LocalDateTime; import javax.persistence.Column; @@ -9,7 +9,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.domain.table.OrderTable; @Table(name = "orders") @Entity diff --git a/src/main/java/kitchenpos/domain/order/OrderLineItem.java b/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java similarity index 92% rename from src/main/java/kitchenpos/domain/order/OrderLineItem.java rename to src/main/java/kitchenpos/common/domain/order/OrderLineItem.java index 3773a570d2..756de305b9 100644 --- a/src/main/java/kitchenpos/domain/order/OrderLineItem.java +++ b/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java @@ -1,11 +1,11 @@ -package kitchenpos.domain.order; +package kitchenpos.common.domain.order; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import kitchenpos.domain.menu.MenuHistory; +import kitchenpos.common.domain.menu.MenuHistory; @Entity public class OrderLineItem { diff --git a/src/main/java/kitchenpos/domain/order/OrderStatus.java b/src/main/java/kitchenpos/common/domain/order/OrderStatus.java similarity index 84% rename from src/main/java/kitchenpos/domain/order/OrderStatus.java rename to src/main/java/kitchenpos/common/domain/order/OrderStatus.java index c33b20ef1b..945c87fdc3 100644 --- a/src/main/java/kitchenpos/domain/order/OrderStatus.java +++ b/src/main/java/kitchenpos/common/domain/order/OrderStatus.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.order; +package kitchenpos.common.domain.order; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/kitchenpos/domain/table/OrderTable.java b/src/main/java/kitchenpos/common/domain/table/OrderTable.java similarity index 97% rename from src/main/java/kitchenpos/domain/table/OrderTable.java rename to src/main/java/kitchenpos/common/domain/table/OrderTable.java index 5e8fc51467..67c55c04ea 100644 --- a/src/main/java/kitchenpos/domain/table/OrderTable.java +++ b/src/main/java/kitchenpos/common/domain/table/OrderTable.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table; +package kitchenpos.common.domain.table; import java.util.Objects; import javax.persistence.Column; diff --git a/src/main/java/kitchenpos/domain/table/OrderTables.java b/src/main/java/kitchenpos/common/domain/table/OrderTables.java similarity index 96% rename from src/main/java/kitchenpos/domain/table/OrderTables.java rename to src/main/java/kitchenpos/common/domain/table/OrderTables.java index cd75c6c4b4..55ac920573 100644 --- a/src/main/java/kitchenpos/domain/table/OrderTables.java +++ b/src/main/java/kitchenpos/common/domain/table/OrderTables.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table; +package kitchenpos.common.domain.table; import java.util.List; diff --git a/src/main/java/kitchenpos/domain/table/TableGroup.java b/src/main/java/kitchenpos/common/domain/table/TableGroup.java similarity index 94% rename from src/main/java/kitchenpos/domain/table/TableGroup.java rename to src/main/java/kitchenpos/common/domain/table/TableGroup.java index 610e3331f4..b99cf28847 100644 --- a/src/main/java/kitchenpos/domain/table/TableGroup.java +++ b/src/main/java/kitchenpos/common/domain/table/TableGroup.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table; +package kitchenpos.common.domain.table; import java.time.LocalDateTime; import javax.persistence.Column; diff --git a/src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java b/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java similarity index 74% rename from src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java rename to src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java index a2ce555712..d016aca741 100644 --- a/src/main/java/kitchenpos/repository/menu/MenuGroupRepository.java +++ b/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.repository.menu; +package kitchenpos.common.repository.menu; import java.util.List; -import kitchenpos.domain.menu.MenuGroup; +import kitchenpos.common.domain.menu.MenuGroup; import org.springframework.data.repository.Repository; public interface MenuGroupRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java b/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java similarity index 79% rename from src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java rename to src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java index e8f4008052..16cda25b8f 100644 --- a/src/main/java/kitchenpos/repository/menu/MenuHistoryRepository.java +++ b/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.repository.menu; +package kitchenpos.common.repository.menu; import java.util.Optional; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.MenuHistory; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.MenuHistory; import org.springframework.data.repository.Repository; public interface MenuHistoryRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/menu/MenuProductRepository.java b/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java similarity index 75% rename from src/main/java/kitchenpos/repository/menu/MenuProductRepository.java rename to src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java index ce59f30348..e8be891484 100644 --- a/src/main/java/kitchenpos/repository/menu/MenuProductRepository.java +++ b/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.repository.menu; +package kitchenpos.common.repository.menu; import java.util.List; -import kitchenpos.domain.menu.MenuProduct; +import kitchenpos.common.domain.menu.MenuProduct; import org.springframework.data.repository.Repository; public interface MenuProductRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/menu/MenuRepository.java b/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java similarity index 84% rename from src/main/java/kitchenpos/repository/menu/MenuRepository.java rename to src/main/java/kitchenpos/common/repository/menu/MenuRepository.java index c0fecef823..85fdc1af05 100644 --- a/src/main/java/kitchenpos/repository/menu/MenuRepository.java +++ b/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.repository.menu; +package kitchenpos.common.repository.menu; import java.util.List; import java.util.Optional; -import kitchenpos.domain.menu.Menu; +import kitchenpos.common.domain.menu.Menu; import org.springframework.data.repository.Repository; public interface MenuRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/menu/ProductRepository.java b/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java similarity index 83% rename from src/main/java/kitchenpos/repository/menu/ProductRepository.java rename to src/main/java/kitchenpos/common/repository/menu/ProductRepository.java index 1c928a3493..6969655ca9 100644 --- a/src/main/java/kitchenpos/repository/menu/ProductRepository.java +++ b/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.repository.menu; +package kitchenpos.common.repository.menu; import java.util.List; import java.util.Optional; -import kitchenpos.domain.menu.Product; +import kitchenpos.common.domain.menu.Product; import org.springframework.data.repository.Repository; public interface ProductRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java b/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java similarity index 75% rename from src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java rename to src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java index be8d3db78e..c1da517516 100644 --- a/src/main/java/kitchenpos/repository/order/OrderLineItemRepository.java +++ b/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.repository.order; +package kitchenpos.common.repository.order; import java.util.List; -import kitchenpos.domain.order.OrderLineItem; +import kitchenpos.common.domain.order.OrderLineItem; import org.springframework.data.repository.Repository; public interface OrderLineItemRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/order/OrderRepository.java b/src/main/java/kitchenpos/common/repository/order/OrderRepository.java similarity index 82% rename from src/main/java/kitchenpos/repository/order/OrderRepository.java rename to src/main/java/kitchenpos/common/repository/order/OrderRepository.java index 560441cbd0..fa64b09e29 100644 --- a/src/main/java/kitchenpos/repository/order/OrderRepository.java +++ b/src/main/java/kitchenpos/common/repository/order/OrderRepository.java @@ -1,9 +1,9 @@ -package kitchenpos.repository.order; +package kitchenpos.common.repository.order; import java.util.List; import java.util.Optional; -import kitchenpos.domain.order.Order; -import kitchenpos.domain.order.OrderStatus; +import kitchenpos.common.domain.order.Order; +import kitchenpos.common.domain.order.OrderStatus; import org.springframework.data.repository.Repository; public interface OrderRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/table/OrderTableRepository.java b/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java similarity index 86% rename from src/main/java/kitchenpos/repository/table/OrderTableRepository.java rename to src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java index ef861405fc..2b34241689 100644 --- a/src/main/java/kitchenpos/repository/table/OrderTableRepository.java +++ b/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.repository.table; +package kitchenpos.common.repository.table; import java.util.List; import java.util.Optional; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.domain.table.OrderTable; import org.springframework.data.repository.Repository; public interface OrderTableRepository extends Repository { diff --git a/src/main/java/kitchenpos/repository/table/TableGroupRepository.java b/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java similarity index 71% rename from src/main/java/kitchenpos/repository/table/TableGroupRepository.java rename to src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java index ac5b872cfc..0a184423a1 100644 --- a/src/main/java/kitchenpos/repository/table/TableGroupRepository.java +++ b/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.repository.table; +package kitchenpos.common.repository.table; import java.util.List; -import kitchenpos.domain.table.TableGroup; +import kitchenpos.common.domain.table.TableGroup; import org.springframework.data.repository.Repository; public interface TableGroupRepository extends Repository { diff --git a/src/main/java/kitchenpos/ui/MenuGroupRestController.java b/src/main/java/kitchenpos/ui/MenuGroupRestController.java index cebccae220..aaa9b6075d 100644 --- a/src/main/java/kitchenpos/ui/MenuGroupRestController.java +++ b/src/main/java/kitchenpos/ui/MenuGroupRestController.java @@ -2,7 +2,6 @@ import kitchenpos.application.MenuGroupService; import kitchenpos.application.dto.response.MenuGroupDto; -import kitchenpos.domain.menu.MenuGroup; import kitchenpos.ui.dto.MenuGroupRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/kitchenpos/ui/ProductRestController.java b/src/main/java/kitchenpos/ui/ProductRestController.java index cbb00dbeb4..56cb8eccec 100644 --- a/src/main/java/kitchenpos/ui/ProductRestController.java +++ b/src/main/java/kitchenpos/ui/ProductRestController.java @@ -2,7 +2,6 @@ import kitchenpos.application.ProductService; import kitchenpos.application.dto.response.ProductDto; -import kitchenpos.domain.menu.Product; import kitchenpos.ui.dto.ProductRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java b/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java index be8c6cc5a4..9c72e62153 100644 --- a/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java +++ b/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java @@ -1,7 +1,7 @@ package kitchenpos.ui.dto; import kitchenpos.application.dto.request.UpdateOrderStatusDto; -import kitchenpos.domain.order.OrderStatus; +import kitchenpos.common.domain.order.OrderStatus; public class OrderStatusRequestDto { diff --git a/src/test/java/kitchenpos/application/MenuGroupServiceTest.java b/src/test/java/kitchenpos/application/MenuGroupServiceTest.java index 3924ccf2e6..cf7769fb16 100644 --- a/src/test/java/kitchenpos/application/MenuGroupServiceTest.java +++ b/src/test/java/kitchenpos/application/MenuGroupServiceTest.java @@ -6,7 +6,6 @@ import java.util.List; import kitchenpos.application.dto.request.CreateMenuGroupDto; import kitchenpos.application.dto.response.MenuGroupDto; -import kitchenpos.domain.menu.MenuGroup; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; diff --git a/src/test/java/kitchenpos/application/OrderServiceTest.java b/src/test/java/kitchenpos/application/OrderServiceTest.java index 57e0908a0c..4213d8dc3b 100644 --- a/src/test/java/kitchenpos/application/OrderServiceTest.java +++ b/src/test/java/kitchenpos/application/OrderServiceTest.java @@ -13,7 +13,7 @@ import kitchenpos.application.dto.request.CreateTableDto; import kitchenpos.application.dto.response.OrderDto; import kitchenpos.application.dto.request.UpdateOrderStatusDto; -import kitchenpos.domain.order.OrderStatus; +import kitchenpos.common.domain.order.OrderStatus; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/kitchenpos/application/ProductServiceTest.java b/src/test/java/kitchenpos/application/ProductServiceTest.java index 3088f56bd3..384455de4b 100644 --- a/src/test/java/kitchenpos/application/ProductServiceTest.java +++ b/src/test/java/kitchenpos/application/ProductServiceTest.java @@ -4,7 +4,6 @@ import java.util.List; import kitchenpos.application.dto.request.CreateProductDto; import kitchenpos.application.dto.response.ProductDto; -import kitchenpos.domain.menu.Product; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/kitchenpos/application/TableGroupServiceTest.java b/src/test/java/kitchenpos/application/TableGroupServiceTest.java index d2c7ce5548..60a076c80c 100644 --- a/src/test/java/kitchenpos/application/TableGroupServiceTest.java +++ b/src/test/java/kitchenpos/application/TableGroupServiceTest.java @@ -13,8 +13,8 @@ import kitchenpos.application.dto.request.CreateTableDto; import kitchenpos.application.dto.request.CreateTableGroupDto; import kitchenpos.application.dto.response.TableGroupDto; -import kitchenpos.repository.table.OrderTableRepository; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.repository.table.OrderTableRepository; +import kitchenpos.common.domain.table.OrderTable; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/src/test/java/kitchenpos/domain/menu/MenuGroupTest.java b/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java similarity index 91% rename from src/test/java/kitchenpos/domain/menu/MenuGroupTest.java rename to src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java index 1c3fbb61a9..e016c8394b 100644 --- a/src/test/java/kitchenpos/domain/menu/MenuGroupTest.java +++ b/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/kitchenpos/domain/menu/MenuTest.java b/src/test/java/kitchenpos/common/domain/menu/MenuTest.java similarity index 94% rename from src/test/java/kitchenpos/domain/menu/MenuTest.java rename to src/test/java/kitchenpos/common/domain/menu/MenuTest.java index babf9ca785..8fce3d5598 100644 --- a/src/test/java/kitchenpos/domain/menu/MenuTest.java +++ b/src/test/java/kitchenpos/common/domain/menu/MenuTest.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/kitchenpos/domain/menu/PriceTest.java b/src/test/java/kitchenpos/common/domain/menu/PriceTest.java similarity index 88% rename from src/test/java/kitchenpos/domain/menu/PriceTest.java rename to src/test/java/kitchenpos/common/domain/menu/PriceTest.java index 4881cfa452..45f386f959 100644 --- a/src/test/java/kitchenpos/domain/menu/PriceTest.java +++ b/src/test/java/kitchenpos/common/domain/menu/PriceTest.java @@ -1,9 +1,8 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.math.BigDecimal; -import java.util.List; import org.junit.jupiter.api.Test; @SuppressWarnings("NonAsciiCharacters") diff --git a/src/test/java/kitchenpos/domain/menu/ProductTest.java b/src/test/java/kitchenpos/common/domain/menu/ProductTest.java similarity index 93% rename from src/test/java/kitchenpos/domain/menu/ProductTest.java rename to src/test/java/kitchenpos/common/domain/menu/ProductTest.java index 74aee02fe6..a89d707681 100644 --- a/src/test/java/kitchenpos/domain/menu/ProductTest.java +++ b/src/test/java/kitchenpos/common/domain/menu/ProductTest.java @@ -1,8 +1,7 @@ -package kitchenpos.domain.menu; +package kitchenpos.common.domain.menu; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.*; import java.math.BigDecimal; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/kitchenpos/domain/order/OrderTest.java b/src/test/java/kitchenpos/common/domain/order/OrderTest.java similarity index 95% rename from src/test/java/kitchenpos/domain/order/OrderTest.java rename to src/test/java/kitchenpos/common/domain/order/OrderTest.java index bb1ae774cc..03271edf2c 100644 --- a/src/test/java/kitchenpos/domain/order/OrderTest.java +++ b/src/test/java/kitchenpos/common/domain/order/OrderTest.java @@ -1,10 +1,10 @@ -package kitchenpos.domain.order; +package kitchenpos.common.domain.order; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.time.LocalDateTime; -import kitchenpos.domain.table.OrderTable; +import kitchenpos.common.domain.table.OrderTable; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/kitchenpos/domain/table/OrderTableTest.java b/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java similarity index 98% rename from src/test/java/kitchenpos/domain/table/OrderTableTest.java rename to src/test/java/kitchenpos/common/domain/table/OrderTableTest.java index 0ff36ef7e0..99bd77f9fc 100644 --- a/src/test/java/kitchenpos/domain/table/OrderTableTest.java +++ b/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table; +package kitchenpos.common.domain.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/kitchenpos/domain/table/OrderTablesTest.java b/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java similarity index 98% rename from src/test/java/kitchenpos/domain/table/OrderTablesTest.java rename to src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java index f7621f8203..5c0581ecf2 100644 --- a/src/test/java/kitchenpos/domain/table/OrderTablesTest.java +++ b/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java @@ -1,4 +1,4 @@ -package kitchenpos.domain.table; +package kitchenpos.common.domain.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java b/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java similarity index 80% rename from src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java rename to src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java index 45ce582dbc..300d40c625 100644 --- a/src/test/java/kitchenpos/repository/MenuHistoryRepositoryTest.java +++ b/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java @@ -1,13 +1,13 @@ -package kitchenpos.repository; +package kitchenpos.common.repository; import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; -import kitchenpos.domain.menu.Menu; -import kitchenpos.domain.menu.MenuHistory; -import kitchenpos.domain.menu.Price; -import kitchenpos.repository.menu.MenuHistoryRepository; -import kitchenpos.repository.menu.MenuRepository; +import kitchenpos.common.domain.menu.Menu; +import kitchenpos.common.domain.menu.MenuHistory; +import kitchenpos.common.domain.menu.Price; +import kitchenpos.common.repository.menu.MenuHistoryRepository; +import kitchenpos.common.repository.menu.MenuRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; From 246cdb81d5599d53d8ac27964d4934b4e531096c Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 14:24:13 +0900 Subject: [PATCH 3/7] chore: setup gradle multi module --- application/build.gradle | 6 +++ .../application/MenuGroupService.java | 0 .../kitchenpos/application/MenuService.java | 0 .../kitchenpos/application/OrderService.java | 0 .../application/ProductService.java | 0 .../application/TableGroupService.java | 0 .../kitchenpos/application/TableService.java | 0 .../dto/request/CreateMenuDto.java | 0 .../dto/request/CreateMenuGroupDto.java | 0 .../dto/request/CreateMenuProductDto.java | 0 .../dto/request/CreateOrderDto.java | 0 .../dto/request/CreateOrderLineItemDto.java | 0 .../dto/request/CreateProductDto.java | 0 .../dto/request/CreateTableDto.java | 0 .../dto/request/CreateTableGroupDto.java | 0 .../dto/request/EmptyTableDto.java | 0 .../dto/request/UpdateGuestNumberDto.java | 0 .../dto/request/UpdateOrderStatusDto.java | 4 +- .../application/dto/response/MenuDto.java | 0 .../dto/response/MenuGroupDto.java | 0 .../dto/response/MenuProductDto.java | 0 .../application/dto/response/OrderDto.java | 0 .../dto/response/OrderLineItemDto.java | 0 .../application/dto/response/ProductDto.java | 0 .../application/dto/response/TableDto.java | 0 .../dto/response/TableGroupDto.java | 0 .../application/MenuGroupServiceTest.java | 0 .../application/MenuServiceTest.java | 0 .../application/OrderServiceTest.java | 4 +- .../application/ProductServiceTest.java | 0 .../application/TableGroupServiceTest.java | 0 .../application/TableServiceTest.java | 0 build.gradle | 52 +++++++++++++------ common/build.gradle | 6 +++ .../kitchenpos/common/domain/menu/Menu.java | 0 .../common/domain/menu/MenuGroup.java | 0 .../common/domain/menu/MenuHistory.java | 0 .../common/domain/menu/MenuProduct.java | 0 .../kitchenpos/common/domain/menu/Price.java | 0 .../common/domain/menu/Product.java | 0 .../common/domain/menu/ProductQuantities.java | 0 .../common/domain/menu/ProductQuantity.java | 0 .../kitchenpos/common/domain/order/Order.java | 0 .../common/domain/order/OrderLineItem.java | 0 .../common/domain/order/OrderStatus.java | 0 .../common/domain/table/OrderTable.java | 0 .../common/domain/table/OrderTables.java | 0 .../common/domain/table/TableGroup.java | 0 .../repository/menu/MenuGroupRepository.java | 0 .../menu/MenuHistoryRepository.java | 0 .../menu/MenuProductRepository.java | 0 .../repository/menu/MenuRepository.java | 0 .../repository/menu/ProductRepository.java | 0 .../order/OrderLineItemRepository.java | 0 .../repository/order/OrderRepository.java | 0 .../table/OrderTableRepository.java | 0 .../table/TableGroupRepository.java | 0 .../main/resources/application.properties | 0 .../V1__Initialize_project_tables.sql | 0 .../db/migration/V2__Insert_default_data.sql | 0 .../V3.0__Create_meny_history_table.sql | 0 ...ter_order_line_item_fk_to_menu_history.sql | 0 .../common/domain/menu/MenuGroupTest.java | 0 .../common/domain/menu/MenuTest.java | 0 .../common/domain/menu/PriceTest.java | 0 .../common/domain/menu/ProductTest.java | 0 .../common/domain/order/OrderTest.java | 0 .../common/domain/table/OrderTableTest.java | 0 .../common/domain/table/OrderTablesTest.java | 0 .../repository/MenuHistoryRepositoryTest.java | 0 settings.gradle | 2 + src/main/resources/static/empty.txt | 0 src/main/resources/templates/empty.txt | 0 ui/build.gradle | 6 +++ .../main/java/kitchenpos/Application.java | 0 .../ui/MenuGroupRestController.java | 0 .../kitchenpos/ui/MenuRestController.java | 0 .../kitchenpos/ui/OrderRestController.java | 0 .../kitchenpos/ui/ProductRestController.java | 0 .../ui/TableGroupRestController.java | 0 .../kitchenpos/ui/TableRestController.java | 0 .../ui/dto/EmptyTableRequestDto.java | 0 .../ui/dto/MenuGroupRequestDto.java | 0 .../kitchenpos/ui/dto/MenuRequestDto.java | 0 .../kitchenpos/ui/dto/OrderRequestDto.java | 0 .../ui/dto/OrderStatusRequestDto.java | 3 +- .../kitchenpos/ui/dto/ProductRequestDto.java | 0 .../ui/dto/TableGroupsRequestDto.java | 0 .../ui/dto/TableGuestNumberRequestDto.java | 0 .../kitchenpos/ui/dto/TableRequestDto.java | 0 .../java/kitchenpos/ApplicationTests.java | 2 +- 91 files changed, 63 insertions(+), 22 deletions(-) create mode 100644 application/build.gradle rename {src => application/src}/main/java/kitchenpos/application/MenuGroupService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/MenuService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/OrderService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/ProductService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/TableGroupService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/TableService.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateMenuDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateOrderDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateProductDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateTableDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/EmptyTableDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java (75%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/MenuDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/MenuGroupDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/MenuProductDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/OrderDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/ProductDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/TableDto.java (100%) rename {src => application/src}/main/java/kitchenpos/application/dto/response/TableGroupDto.java (100%) rename {src => application/src}/test/java/kitchenpos/application/MenuGroupServiceTest.java (100%) rename {src => application/src}/test/java/kitchenpos/application/MenuServiceTest.java (100%) rename {src => application/src}/test/java/kitchenpos/application/OrderServiceTest.java (98%) rename {src => application/src}/test/java/kitchenpos/application/ProductServiceTest.java (100%) rename {src => application/src}/test/java/kitchenpos/application/TableGroupServiceTest.java (100%) rename {src => application/src}/test/java/kitchenpos/application/TableServiceTest.java (100%) create mode 100644 common/build.gradle rename {src => common/src}/main/java/kitchenpos/common/domain/menu/Menu.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/MenuGroup.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/MenuHistory.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/MenuProduct.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/Price.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/Product.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/ProductQuantities.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/menu/ProductQuantity.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/order/Order.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/order/OrderLineItem.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/order/OrderStatus.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/table/OrderTable.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/table/OrderTables.java (100%) rename {src => common/src}/main/java/kitchenpos/common/domain/table/TableGroup.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/menu/MenuRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/menu/ProductRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/order/OrderRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/table/OrderTableRepository.java (100%) rename {src => common/src}/main/java/kitchenpos/common/repository/table/TableGroupRepository.java (100%) rename {src => common/src}/main/resources/application.properties (100%) rename {src => common/src}/main/resources/db/migration/V1__Initialize_project_tables.sql (100%) rename {src => common/src}/main/resources/db/migration/V2__Insert_default_data.sql (100%) rename {src => common/src}/main/resources/db/migration/V3.0__Create_meny_history_table.sql (100%) rename {src => common/src}/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/menu/MenuTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/menu/PriceTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/menu/ProductTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/order/OrderTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/table/OrderTableTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/domain/table/OrderTablesTest.java (100%) rename {src => common/src}/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java (100%) delete mode 100644 src/main/resources/static/empty.txt delete mode 100644 src/main/resources/templates/empty.txt create mode 100644 ui/build.gradle rename {src => ui/src}/main/java/kitchenpos/Application.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/MenuGroupRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/MenuRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/OrderRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/ProductRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/TableGroupRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/TableRestController.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/MenuRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/OrderRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java (72%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/ProductRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java (100%) rename {src => ui/src}/main/java/kitchenpos/ui/dto/TableRequestDto.java (100%) rename src/test/java/kitchenpos/ApplicationTest.java => ui/src/test/java/kitchenpos/ApplicationTests.java (87%) diff --git a/application/build.gradle b/application/build.gradle new file mode 100644 index 0000000000..09a66ff53e --- /dev/null +++ b/application/build.gradle @@ -0,0 +1,6 @@ +bootJar { enabled = false } + +jar { enabled = true } + +dependencies { +} diff --git a/src/main/java/kitchenpos/application/MenuGroupService.java b/application/src/main/java/kitchenpos/application/MenuGroupService.java similarity index 100% rename from src/main/java/kitchenpos/application/MenuGroupService.java rename to application/src/main/java/kitchenpos/application/MenuGroupService.java diff --git a/src/main/java/kitchenpos/application/MenuService.java b/application/src/main/java/kitchenpos/application/MenuService.java similarity index 100% rename from src/main/java/kitchenpos/application/MenuService.java rename to application/src/main/java/kitchenpos/application/MenuService.java diff --git a/src/main/java/kitchenpos/application/OrderService.java b/application/src/main/java/kitchenpos/application/OrderService.java similarity index 100% rename from src/main/java/kitchenpos/application/OrderService.java rename to application/src/main/java/kitchenpos/application/OrderService.java diff --git a/src/main/java/kitchenpos/application/ProductService.java b/application/src/main/java/kitchenpos/application/ProductService.java similarity index 100% rename from src/main/java/kitchenpos/application/ProductService.java rename to application/src/main/java/kitchenpos/application/ProductService.java diff --git a/src/main/java/kitchenpos/application/TableGroupService.java b/application/src/main/java/kitchenpos/application/TableGroupService.java similarity index 100% rename from src/main/java/kitchenpos/application/TableGroupService.java rename to application/src/main/java/kitchenpos/application/TableGroupService.java diff --git a/src/main/java/kitchenpos/application/TableService.java b/application/src/main/java/kitchenpos/application/TableService.java similarity index 100% rename from src/main/java/kitchenpos/application/TableService.java rename to application/src/main/java/kitchenpos/application/TableService.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateProductDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateTableDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java b/application/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java rename to application/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java b/application/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java rename to application/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java b/application/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java rename to application/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java diff --git a/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java b/application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java similarity index 75% rename from src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java rename to application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java index 4c807d1e4e..e85036ca64 100644 --- a/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java +++ b/application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java @@ -7,9 +7,9 @@ public class UpdateOrderStatusDto { private final Long orderId; private final OrderStatus orderStatus; - public UpdateOrderStatusDto(Long orderId, OrderStatus orderStatus) { + public UpdateOrderStatusDto(Long orderId, String orderStatus) { this.orderId = orderId; - this.orderStatus = orderStatus; + this.orderStatus = OrderStatus.valueOf(orderStatus); } public Long getOrderId() { diff --git a/src/main/java/kitchenpos/application/dto/response/MenuDto.java b/application/src/main/java/kitchenpos/application/dto/response/MenuDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/MenuDto.java rename to application/src/main/java/kitchenpos/application/dto/response/MenuDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java b/application/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java rename to application/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java b/application/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/MenuProductDto.java rename to application/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/OrderDto.java b/application/src/main/java/kitchenpos/application/dto/response/OrderDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/OrderDto.java rename to application/src/main/java/kitchenpos/application/dto/response/OrderDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java b/application/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java rename to application/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/ProductDto.java b/application/src/main/java/kitchenpos/application/dto/response/ProductDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/ProductDto.java rename to application/src/main/java/kitchenpos/application/dto/response/ProductDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/TableDto.java b/application/src/main/java/kitchenpos/application/dto/response/TableDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/TableDto.java rename to application/src/main/java/kitchenpos/application/dto/response/TableDto.java diff --git a/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java b/application/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java similarity index 100% rename from src/main/java/kitchenpos/application/dto/response/TableGroupDto.java rename to application/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java diff --git a/src/test/java/kitchenpos/application/MenuGroupServiceTest.java b/application/src/test/java/kitchenpos/application/MenuGroupServiceTest.java similarity index 100% rename from src/test/java/kitchenpos/application/MenuGroupServiceTest.java rename to application/src/test/java/kitchenpos/application/MenuGroupServiceTest.java diff --git a/src/test/java/kitchenpos/application/MenuServiceTest.java b/application/src/test/java/kitchenpos/application/MenuServiceTest.java similarity index 100% rename from src/test/java/kitchenpos/application/MenuServiceTest.java rename to application/src/test/java/kitchenpos/application/MenuServiceTest.java diff --git a/src/test/java/kitchenpos/application/OrderServiceTest.java b/application/src/test/java/kitchenpos/application/OrderServiceTest.java similarity index 98% rename from src/test/java/kitchenpos/application/OrderServiceTest.java rename to application/src/test/java/kitchenpos/application/OrderServiceTest.java index 4213d8dc3b..33dcded426 100644 --- a/src/test/java/kitchenpos/application/OrderServiceTest.java +++ b/application/src/test/java/kitchenpos/application/OrderServiceTest.java @@ -99,7 +99,7 @@ class ChangeOrderStatusTest { List orderLineItems = List.of(new CreateOrderLineItemDto(savedMenuId, 1)); Long orderId = orderService.create(new CreateOrderDto(orderTableId, orderLineItems)).getId(); - UpdateOrderStatusDto updateOrderStatusDto = new UpdateOrderStatusDto(orderId, OrderStatus.MEAL); + UpdateOrderStatusDto updateOrderStatusDto = new UpdateOrderStatusDto(orderId, OrderStatus.MEAL.name()); OrderDto actual = orderService.changeOrderStatus(updateOrderStatusDto); assertAll( () -> assertThat(actual.getId()).isNotNull(), @@ -112,7 +112,7 @@ class ChangeOrderStatusTest { @Test void 존재하지_않는_주문인_경우_예외를_발생시킨다() { - UpdateOrderStatusDto updateOrderStatusDto = new UpdateOrderStatusDto(99999L, OrderStatus.MEAL); + UpdateOrderStatusDto updateOrderStatusDto = new UpdateOrderStatusDto(99999L, OrderStatus.MEAL.name()); assertThatThrownBy(() -> orderService.changeOrderStatus(updateOrderStatusDto)) .hasCauseInstanceOf(IllegalArgumentException.class); } diff --git a/src/test/java/kitchenpos/application/ProductServiceTest.java b/application/src/test/java/kitchenpos/application/ProductServiceTest.java similarity index 100% rename from src/test/java/kitchenpos/application/ProductServiceTest.java rename to application/src/test/java/kitchenpos/application/ProductServiceTest.java diff --git a/src/test/java/kitchenpos/application/TableGroupServiceTest.java b/application/src/test/java/kitchenpos/application/TableGroupServiceTest.java similarity index 100% rename from src/test/java/kitchenpos/application/TableGroupServiceTest.java rename to application/src/test/java/kitchenpos/application/TableGroupServiceTest.java diff --git a/src/test/java/kitchenpos/application/TableServiceTest.java b/application/src/test/java/kitchenpos/application/TableServiceTest.java similarity index 100% rename from src/test/java/kitchenpos/application/TableServiceTest.java rename to application/src/test/java/kitchenpos/application/TableServiceTest.java diff --git a/build.gradle b/build.gradle index f8d8814c52..866242582e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,28 +1,50 @@ plugins { id 'org.springframework.boot' version '2.3.3.RELEASE' id 'io.spring.dependency-management' version '1.0.10.RELEASE' - id 'java' } -group = 'camp.nextstep.edu' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '11' - repositories { mavenCentral() } -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.flywaydb:flyway-core' - runtimeOnly 'com.h2database:h2' - testImplementation('org.springframework.boot:spring-boot-starter-test') { - exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' +subprojects { + group 'camp.nextstep.edu' + version '0.0.1-SNAPSHOT' + + apply plugin: 'java' + apply plugin: 'org.springframework.boot' + apply plugin: 'io.spring.dependency-management' + + sourceCompatibility = '11' + + repositories { + mavenCentral() + } + + dependencies { + implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.flywaydb:flyway-core' + runtimeOnly 'com.h2database:h2' + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + } + + test { + useJUnitPlatform() + } +} + +project(':ui') { + dependencies { + implementation project(':application') } } -test { - useJUnitPlatform() +project(':application') { + dependencies { + implementation project(':common') + } } diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 0000000000..09a66ff53e --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,6 @@ +bootJar { enabled = false } + +jar { enabled = true } + +dependencies { +} diff --git a/src/main/java/kitchenpos/common/domain/menu/Menu.java b/common/src/main/java/kitchenpos/common/domain/menu/Menu.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/Menu.java rename to common/src/main/java/kitchenpos/common/domain/menu/Menu.java diff --git a/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java b/common/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/MenuGroup.java rename to common/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java diff --git a/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java b/common/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/MenuHistory.java rename to common/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java diff --git a/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java b/common/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/MenuProduct.java rename to common/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java diff --git a/src/main/java/kitchenpos/common/domain/menu/Price.java b/common/src/main/java/kitchenpos/common/domain/menu/Price.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/Price.java rename to common/src/main/java/kitchenpos/common/domain/menu/Price.java diff --git a/src/main/java/kitchenpos/common/domain/menu/Product.java b/common/src/main/java/kitchenpos/common/domain/menu/Product.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/Product.java rename to common/src/main/java/kitchenpos/common/domain/menu/Product.java diff --git a/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java b/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java rename to common/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java diff --git a/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java b/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java rename to common/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java diff --git a/src/main/java/kitchenpos/common/domain/order/Order.java b/common/src/main/java/kitchenpos/common/domain/order/Order.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/order/Order.java rename to common/src/main/java/kitchenpos/common/domain/order/Order.java diff --git a/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java b/common/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/order/OrderLineItem.java rename to common/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java diff --git a/src/main/java/kitchenpos/common/domain/order/OrderStatus.java b/common/src/main/java/kitchenpos/common/domain/order/OrderStatus.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/order/OrderStatus.java rename to common/src/main/java/kitchenpos/common/domain/order/OrderStatus.java diff --git a/src/main/java/kitchenpos/common/domain/table/OrderTable.java b/common/src/main/java/kitchenpos/common/domain/table/OrderTable.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/table/OrderTable.java rename to common/src/main/java/kitchenpos/common/domain/table/OrderTable.java diff --git a/src/main/java/kitchenpos/common/domain/table/OrderTables.java b/common/src/main/java/kitchenpos/common/domain/table/OrderTables.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/table/OrderTables.java rename to common/src/main/java/kitchenpos/common/domain/table/OrderTables.java diff --git a/src/main/java/kitchenpos/common/domain/table/TableGroup.java b/common/src/main/java/kitchenpos/common/domain/table/TableGroup.java similarity index 100% rename from src/main/java/kitchenpos/common/domain/table/TableGroup.java rename to common/src/main/java/kitchenpos/common/domain/table/TableGroup.java diff --git a/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java b/common/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java rename to common/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java diff --git a/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java b/common/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java rename to common/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java diff --git a/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java b/common/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java rename to common/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java diff --git a/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java b/common/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/menu/MenuRepository.java rename to common/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java diff --git a/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java b/common/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/menu/ProductRepository.java rename to common/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java diff --git a/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java b/common/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java rename to common/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java diff --git a/src/main/java/kitchenpos/common/repository/order/OrderRepository.java b/common/src/main/java/kitchenpos/common/repository/order/OrderRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/order/OrderRepository.java rename to common/src/main/java/kitchenpos/common/repository/order/OrderRepository.java diff --git a/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java b/common/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java rename to common/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java diff --git a/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java b/common/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java similarity index 100% rename from src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java rename to common/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java diff --git a/src/main/resources/application.properties b/common/src/main/resources/application.properties similarity index 100% rename from src/main/resources/application.properties rename to common/src/main/resources/application.properties diff --git a/src/main/resources/db/migration/V1__Initialize_project_tables.sql b/common/src/main/resources/db/migration/V1__Initialize_project_tables.sql similarity index 100% rename from src/main/resources/db/migration/V1__Initialize_project_tables.sql rename to common/src/main/resources/db/migration/V1__Initialize_project_tables.sql diff --git a/src/main/resources/db/migration/V2__Insert_default_data.sql b/common/src/main/resources/db/migration/V2__Insert_default_data.sql similarity index 100% rename from src/main/resources/db/migration/V2__Insert_default_data.sql rename to common/src/main/resources/db/migration/V2__Insert_default_data.sql diff --git a/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql b/common/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql similarity index 100% rename from src/main/resources/db/migration/V3.0__Create_meny_history_table.sql rename to common/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql diff --git a/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql b/common/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql similarity index 100% rename from src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql rename to common/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql diff --git a/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java b/common/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java rename to common/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java diff --git a/src/test/java/kitchenpos/common/domain/menu/MenuTest.java b/common/src/test/java/kitchenpos/common/domain/menu/MenuTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/menu/MenuTest.java rename to common/src/test/java/kitchenpos/common/domain/menu/MenuTest.java diff --git a/src/test/java/kitchenpos/common/domain/menu/PriceTest.java b/common/src/test/java/kitchenpos/common/domain/menu/PriceTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/menu/PriceTest.java rename to common/src/test/java/kitchenpos/common/domain/menu/PriceTest.java diff --git a/src/test/java/kitchenpos/common/domain/menu/ProductTest.java b/common/src/test/java/kitchenpos/common/domain/menu/ProductTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/menu/ProductTest.java rename to common/src/test/java/kitchenpos/common/domain/menu/ProductTest.java diff --git a/src/test/java/kitchenpos/common/domain/order/OrderTest.java b/common/src/test/java/kitchenpos/common/domain/order/OrderTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/order/OrderTest.java rename to common/src/test/java/kitchenpos/common/domain/order/OrderTest.java diff --git a/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java b/common/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/table/OrderTableTest.java rename to common/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java diff --git a/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java b/common/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java similarity index 100% rename from src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java rename to common/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java diff --git a/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java b/common/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java similarity index 100% rename from src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java rename to common/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java diff --git a/settings.gradle b/settings.gradle index db5850c279..fe57cad053 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,3 @@ rootProject.name = 'kitchenpos' + +include 'common', 'application', 'ui' diff --git a/src/main/resources/static/empty.txt b/src/main/resources/static/empty.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/main/resources/templates/empty.txt b/src/main/resources/templates/empty.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ui/build.gradle b/ui/build.gradle new file mode 100644 index 0000000000..09a66ff53e --- /dev/null +++ b/ui/build.gradle @@ -0,0 +1,6 @@ +bootJar { enabled = false } + +jar { enabled = true } + +dependencies { +} diff --git a/src/main/java/kitchenpos/Application.java b/ui/src/main/java/kitchenpos/Application.java similarity index 100% rename from src/main/java/kitchenpos/Application.java rename to ui/src/main/java/kitchenpos/Application.java diff --git a/src/main/java/kitchenpos/ui/MenuGroupRestController.java b/ui/src/main/java/kitchenpos/ui/MenuGroupRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/MenuGroupRestController.java rename to ui/src/main/java/kitchenpos/ui/MenuGroupRestController.java diff --git a/src/main/java/kitchenpos/ui/MenuRestController.java b/ui/src/main/java/kitchenpos/ui/MenuRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/MenuRestController.java rename to ui/src/main/java/kitchenpos/ui/MenuRestController.java diff --git a/src/main/java/kitchenpos/ui/OrderRestController.java b/ui/src/main/java/kitchenpos/ui/OrderRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/OrderRestController.java rename to ui/src/main/java/kitchenpos/ui/OrderRestController.java diff --git a/src/main/java/kitchenpos/ui/ProductRestController.java b/ui/src/main/java/kitchenpos/ui/ProductRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/ProductRestController.java rename to ui/src/main/java/kitchenpos/ui/ProductRestController.java diff --git a/src/main/java/kitchenpos/ui/TableGroupRestController.java b/ui/src/main/java/kitchenpos/ui/TableGroupRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/TableGroupRestController.java rename to ui/src/main/java/kitchenpos/ui/TableGroupRestController.java diff --git a/src/main/java/kitchenpos/ui/TableRestController.java b/ui/src/main/java/kitchenpos/ui/TableRestController.java similarity index 100% rename from src/main/java/kitchenpos/ui/TableRestController.java rename to ui/src/main/java/kitchenpos/ui/TableRestController.java diff --git a/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/MenuRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/OrderRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java similarity index 72% rename from src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java index 9c72e62153..bc7b26afca 100644 --- a/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java @@ -1,7 +1,6 @@ package kitchenpos.ui.dto; import kitchenpos.application.dto.request.UpdateOrderStatusDto; -import kitchenpos.common.domain.order.OrderStatus; public class OrderStatusRequestDto { @@ -11,7 +10,7 @@ public OrderStatusRequestDto() { } public UpdateOrderStatusDto toUpdateOrderStatusDto(Long orderId) { - return new UpdateOrderStatusDto(orderId, OrderStatus.valueOf(orderStatus)); + return new UpdateOrderStatusDto(orderId, orderStatus); } public String getOrderStatus() { diff --git a/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/ProductRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java diff --git a/src/main/java/kitchenpos/ui/dto/TableRequestDto.java b/ui/src/main/java/kitchenpos/ui/dto/TableRequestDto.java similarity index 100% rename from src/main/java/kitchenpos/ui/dto/TableRequestDto.java rename to ui/src/main/java/kitchenpos/ui/dto/TableRequestDto.java diff --git a/src/test/java/kitchenpos/ApplicationTest.java b/ui/src/test/java/kitchenpos/ApplicationTests.java similarity index 87% rename from src/test/java/kitchenpos/ApplicationTest.java rename to ui/src/test/java/kitchenpos/ApplicationTests.java index a0b48e4bf2..c5f80290ae 100644 --- a/src/test/java/kitchenpos/ApplicationTest.java +++ b/ui/src/test/java/kitchenpos/ApplicationTests.java @@ -4,7 +4,7 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -class ApplicationTest { +class ApplicationTests { @Test void contextLoads() { From 613b9cf10a50eb2fb3e9c69b6ca485db1cd4a3d8 Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 15:24:09 +0900 Subject: [PATCH 4/7] fix: add TestApplications for fixing broken tests --- .../src/test/java/kitchenpos/TestApplication.java | 12 ++++++++++++ build.gradle | 2 ++ .../test/java/kitchenpos/CoreTestApplication.java | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 application/src/test/java/kitchenpos/TestApplication.java create mode 100644 common/src/test/java/kitchenpos/CoreTestApplication.java diff --git a/application/src/test/java/kitchenpos/TestApplication.java b/application/src/test/java/kitchenpos/TestApplication.java new file mode 100644 index 0000000000..964a64fb75 --- /dev/null +++ b/application/src/test/java/kitchenpos/TestApplication.java @@ -0,0 +1,12 @@ +package kitchenpos; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +class TestApplication { + + public static void main(String[] args) { + SpringApplication.run(TestApplication.class, args); + } +} diff --git a/build.gradle b/build.gradle index 866242582e..7ba2b93ef3 100644 --- a/build.gradle +++ b/build.gradle @@ -40,11 +40,13 @@ subprojects { project(':ui') { dependencies { implementation project(':application') + testImplementation project(':application') } } project(':application') { dependencies { implementation project(':common') + testImplementation project(':common') } } diff --git a/common/src/test/java/kitchenpos/CoreTestApplication.java b/common/src/test/java/kitchenpos/CoreTestApplication.java new file mode 100644 index 0000000000..f4faf556e6 --- /dev/null +++ b/common/src/test/java/kitchenpos/CoreTestApplication.java @@ -0,0 +1,12 @@ +package kitchenpos; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +class CoreTestApplication { + + public static void main(String[] args) { + SpringApplication.run(CoreTestApplication.class, args); + } +} From acdef59ffa9eed5c5d9d07fe3b31f6893885147f Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 15:42:02 +0900 Subject: [PATCH 5/7] refactor: create menu, order, table sub-packages for each module --- .../{ => menu}/MenuGroupService.java | 6 +++--- .../application/{ => menu}/MenuService.java | 8 ++++---- .../{ => menu}/ProductService.java | 6 +++--- .../{ => menu}/dto/request/CreateMenuDto.java | 2 +- .../dto/request/CreateMenuGroupDto.java | 2 +- .../dto/request/CreateMenuProductDto.java | 2 +- .../dto/request/CreateProductDto.java | 2 +- .../{ => menu}/dto/response/MenuDto.java | 2 +- .../{ => menu}/dto/response/MenuGroupDto.java | 2 +- .../dto/response/MenuProductDto.java | 2 +- .../{ => menu}/dto/response/ProductDto.java | 2 +- .../application/{ => order}/OrderService.java | 10 +++++----- .../dto/request/CreateOrderDto.java | 2 +- .../dto/request/CreateOrderLineItemDto.java | 2 +- .../dto/request}/OrderLineItemDto.java | 2 +- .../dto/request/UpdateOrderStatusDto.java | 2 +- .../{ => order}/dto/response/OrderDto.java | 3 ++- .../{ => table}/TableGroupService.java | 6 +++--- .../application/{ => table}/TableService.java | 10 +++++----- .../dto/request/CreateTableDto.java | 2 +- .../dto/request/CreateTableGroupDto.java | 2 +- .../dto/request/EmptyTableDto.java | 2 +- .../dto/request/UpdateGuestNumberDto.java | 2 +- .../{ => table}/dto/response/TableDto.java | 2 +- .../dto/response/TableGroupDto.java | 2 +- .../{ => menu}/MenuGroupServiceTest.java | 8 ++++---- .../{ => menu}/MenuServiceTest.java | 10 +++++----- .../{ => menu}/ProductServiceTest.java | 6 +++--- .../{ => order}/OrderServiceTest.java | 18 +++++++++-------- .../{ => table}/TableGroupServiceTest.java | 18 +++++++++-------- .../{ => table}/TableServiceTest.java | 20 ++++++++++--------- .../{ => menu}/MenuHistoryRepositoryTest.java | 4 +--- .../{ => menu}/MenuGroupRestController.java | 8 ++++---- .../ui/{ => menu}/MenuRestController.java | 8 ++++---- .../ui/{ => menu}/ProductRestController.java | 8 ++++---- .../{ => menu}/dto/MenuGroupRequestDto.java | 4 ++-- .../ui/{ => menu}/dto/MenuRequestDto.java | 6 +++--- .../ui/{ => menu}/dto/ProductRequestDto.java | 4 ++-- .../ui/{ => order}/OrderRestController.java | 10 +++++----- .../ui/{ => order}/dto/OrderRequestDto.java | 6 +++--- .../dto/OrderStatusRequestDto.java | 4 ++-- .../{ => table}/TableGroupRestController.java | 8 ++++---- .../ui/{ => table}/TableRestController.java | 16 +++++++-------- .../{ => table}/dto/EmptyTableRequestDto.java | 4 ++-- .../dto/TableGroupsRequestDto.java | 4 ++-- .../dto/TableGuestNumberRequestDto.java | 4 ++-- .../ui/{ => table}/dto/TableRequestDto.java | 4 ++-- 47 files changed, 136 insertions(+), 131 deletions(-) rename application/src/main/java/kitchenpos/application/{ => menu}/MenuGroupService.java (85%) rename application/src/main/java/kitchenpos/application/{ => menu}/MenuService.java (93%) rename application/src/main/java/kitchenpos/application/{ => menu}/ProductService.java (85%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/request/CreateMenuDto.java (95%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/request/CreateMenuGroupDto.java (80%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/request/CreateMenuProductDto.java (88%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/request/CreateProductDto.java (91%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/response/MenuDto.java (96%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/response/MenuGroupDto.java (90%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/response/MenuProductDto.java (94%) rename application/src/main/java/kitchenpos/application/{ => menu}/dto/response/ProductDto.java (93%) rename application/src/main/java/kitchenpos/application/{ => order}/OrderService.java (92%) rename application/src/main/java/kitchenpos/application/{ => order}/dto/request/CreateOrderDto.java (91%) rename application/src/main/java/kitchenpos/application/{ => order}/dto/request/CreateOrderLineItemDto.java (88%) rename application/src/main/java/kitchenpos/application/{dto/response => order/dto/request}/OrderLineItemDto.java (95%) rename application/src/main/java/kitchenpos/application/{ => order}/dto/request/UpdateOrderStatusDto.java (90%) rename application/src/main/java/kitchenpos/application/{ => order}/dto/response/OrderDto.java (94%) rename application/src/main/java/kitchenpos/application/{ => table}/TableGroupService.java (94%) rename application/src/main/java/kitchenpos/application/{ => table}/TableService.java (88%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/request/CreateTableDto.java (88%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/request/CreateTableGroupDto.java (90%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/request/EmptyTableDto.java (88%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/request/UpdateGuestNumberDto.java (89%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/response/TableDto.java (94%) rename application/src/main/java/kitchenpos/application/{ => table}/dto/response/TableGroupDto.java (95%) rename application/src/test/java/kitchenpos/application/{ => menu}/MenuGroupServiceTest.java (82%) rename application/src/test/java/kitchenpos/application/{ => menu}/MenuServiceTest.java (92%) rename application/src/test/java/kitchenpos/application/{ => menu}/ProductServiceTest.java (92%) rename application/src/test/java/kitchenpos/application/{ => order}/OrderServiceTest.java (89%) rename application/src/test/java/kitchenpos/application/{ => table}/TableGroupServiceTest.java (89%) rename application/src/test/java/kitchenpos/application/{ => table}/TableServiceTest.java (88%) rename common/src/test/java/kitchenpos/common/repository/{ => menu}/MenuHistoryRepositoryTest.java (89%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/MenuGroupRestController.java (85%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/MenuRestController.java (85%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/ProductRestController.java (85%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/dto/MenuGroupRequestDto.java (73%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/dto/MenuRequestDto.java (89%) rename ui/src/main/java/kitchenpos/ui/{ => menu}/dto/ProductRequestDto.java (80%) rename ui/src/main/java/kitchenpos/ui/{ => order}/OrderRestController.java (83%) rename ui/src/main/java/kitchenpos/ui/{ => order}/dto/OrderRequestDto.java (86%) rename ui/src/main/java/kitchenpos/ui/{ => order}/dto/OrderStatusRequestDto.java (76%) rename ui/src/main/java/kitchenpos/ui/{ => table}/TableGroupRestController.java (83%) rename ui/src/main/java/kitchenpos/ui/{ => table}/TableRestController.java (82%) rename ui/src/main/java/kitchenpos/ui/{ => table}/dto/EmptyTableRequestDto.java (75%) rename ui/src/main/java/kitchenpos/ui/{ => table}/dto/TableGroupsRequestDto.java (87%) rename ui/src/main/java/kitchenpos/ui/{ => table}/dto/TableGuestNumberRequestDto.java (77%) rename ui/src/main/java/kitchenpos/ui/{ => table}/dto/TableRequestDto.java (80%) diff --git a/application/src/main/java/kitchenpos/application/MenuGroupService.java b/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java similarity index 85% rename from application/src/main/java/kitchenpos/application/MenuGroupService.java rename to application/src/main/java/kitchenpos/application/menu/MenuGroupService.java index c3aad3e876..ca9bf945ed 100644 --- a/application/src/main/java/kitchenpos/application/MenuGroupService.java +++ b/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java @@ -1,8 +1,8 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateMenuGroupDto; -import kitchenpos.application.dto.response.MenuGroupDto; +import kitchenpos.application.menu.dto.request.CreateMenuGroupDto; +import kitchenpos.application.menu.dto.response.MenuGroupDto; import kitchenpos.common.domain.menu.MenuGroup; import kitchenpos.common.repository.menu.MenuGroupRepository; import org.springframework.stereotype.Service; diff --git a/application/src/main/java/kitchenpos/application/MenuService.java b/application/src/main/java/kitchenpos/application/menu/MenuService.java similarity index 93% rename from application/src/main/java/kitchenpos/application/MenuService.java rename to application/src/main/java/kitchenpos/application/menu/MenuService.java index 49db2cf321..d06090ef86 100644 --- a/application/src/main/java/kitchenpos/application/MenuService.java +++ b/application/src/main/java/kitchenpos/application/menu/MenuService.java @@ -1,10 +1,10 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import java.util.ArrayList; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; -import kitchenpos.application.dto.response.MenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; +import kitchenpos.application.menu.dto.response.MenuDto; import kitchenpos.common.domain.menu.MenuHistory; import kitchenpos.common.domain.menu.MenuProduct; import kitchenpos.common.domain.menu.ProductQuantities; diff --git a/application/src/main/java/kitchenpos/application/ProductService.java b/application/src/main/java/kitchenpos/application/menu/ProductService.java similarity index 85% rename from application/src/main/java/kitchenpos/application/ProductService.java rename to application/src/main/java/kitchenpos/application/menu/ProductService.java index 19ab1304cc..dd6e6e120e 100644 --- a/application/src/main/java/kitchenpos/application/ProductService.java +++ b/application/src/main/java/kitchenpos/application/menu/ProductService.java @@ -1,8 +1,8 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateProductDto; -import kitchenpos.application.dto.response.ProductDto; +import kitchenpos.application.menu.dto.request.CreateProductDto; +import kitchenpos.application.menu.dto.response.ProductDto; import kitchenpos.common.domain.menu.Product; import kitchenpos.common.repository.menu.ProductRepository; import org.springframework.stereotype.Service; diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java similarity index 95% rename from application/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java index 67b3c062dd..a054276389 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.menu.dto.request; import java.math.BigDecimal; import java.util.List; diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuGroupDto.java similarity index 80% rename from application/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuGroupDto.java index f60a3df795..7adb84a2df 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuGroupDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuGroupDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.menu.dto.request; public class CreateMenuGroupDto { diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuProductDto.java similarity index 88% rename from application/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuProductDto.java index 9b69ae7c45..1407a3639d 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateMenuProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuProductDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.menu.dto.request; public class CreateMenuProductDto { diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java similarity index 91% rename from application/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java index 7458264807..23ff77e938 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.menu.dto.request; import java.math.BigDecimal; import kitchenpos.common.domain.menu.Product; diff --git a/application/src/main/java/kitchenpos/application/dto/response/MenuDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java similarity index 96% rename from application/src/main/java/kitchenpos/application/dto/response/MenuDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java index ca1f1b59a3..32b12d57ec 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/MenuDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.menu.dto.response; import java.math.BigDecimal; import java.util.List; diff --git a/application/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java similarity index 90% rename from application/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java index d6ce2757b4..e7e084bea9 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/MenuGroupDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.menu.dto.response; import kitchenpos.common.domain.menu.MenuGroup; diff --git a/application/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java similarity index 94% rename from application/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java index 72b47ef32f..f1bb49ad43 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/MenuProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.menu.dto.response; import kitchenpos.common.domain.menu.MenuProduct; diff --git a/application/src/main/java/kitchenpos/application/dto/response/ProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java similarity index 93% rename from application/src/main/java/kitchenpos/application/dto/response/ProductDto.java rename to application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java index ead58a8047..c9e5e58983 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/ProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.menu.dto.response; import java.math.BigDecimal; import kitchenpos.common.domain.menu.Product; diff --git a/application/src/main/java/kitchenpos/application/OrderService.java b/application/src/main/java/kitchenpos/application/order/OrderService.java similarity index 92% rename from application/src/main/java/kitchenpos/application/OrderService.java rename to application/src/main/java/kitchenpos/application/order/OrderService.java index a286c3d4e6..ffcdc05ec6 100644 --- a/application/src/main/java/kitchenpos/application/OrderService.java +++ b/application/src/main/java/kitchenpos/application/order/OrderService.java @@ -1,10 +1,10 @@ -package kitchenpos.application; +package kitchenpos.application.order; import java.util.ArrayList; -import kitchenpos.application.dto.request.CreateOrderDto; -import kitchenpos.application.dto.request.CreateOrderLineItemDto; -import kitchenpos.application.dto.response.OrderDto; -import kitchenpos.application.dto.request.UpdateOrderStatusDto; +import kitchenpos.application.order.dto.request.CreateOrderDto; +import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; +import kitchenpos.application.order.dto.response.OrderDto; +import kitchenpos.application.order.dto.request.UpdateOrderStatusDto; import kitchenpos.common.domain.menu.Menu; import kitchenpos.common.domain.menu.MenuHistory; import kitchenpos.common.repository.menu.MenuHistoryRepository; diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderDto.java similarity index 91% rename from application/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java rename to application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderDto.java index c6f1a80caa..7d6980c4df 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateOrderDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.order.dto.request; import java.util.List; diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderLineItemDto.java similarity index 88% rename from application/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java rename to application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderLineItemDto.java index c894f2ee3a..4b4e778767 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateOrderLineItemDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/CreateOrderLineItemDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.order.dto.request; public class CreateOrderLineItemDto { diff --git a/application/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java similarity index 95% rename from application/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java rename to application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java index 54656386e0..6c57f25640 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/OrderLineItemDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.order.dto.request; import kitchenpos.common.domain.order.OrderLineItem; diff --git a/application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java similarity index 90% rename from application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java rename to application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java index e85036ca64..f49a174be9 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/UpdateOrderStatusDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.order.dto.request; import kitchenpos.common.domain.order.OrderStatus; diff --git a/application/src/main/java/kitchenpos/application/dto/response/OrderDto.java b/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java similarity index 94% rename from application/src/main/java/kitchenpos/application/dto/response/OrderDto.java rename to application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java index 8baa3b779c..5aeea3e1c1 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/OrderDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java @@ -1,8 +1,9 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.order.dto.response; import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; +import kitchenpos.application.order.dto.request.OrderLineItemDto; import kitchenpos.common.domain.order.Order; import kitchenpos.common.domain.order.OrderLineItem; diff --git a/application/src/main/java/kitchenpos/application/TableGroupService.java b/application/src/main/java/kitchenpos/application/table/TableGroupService.java similarity index 94% rename from application/src/main/java/kitchenpos/application/TableGroupService.java rename to application/src/main/java/kitchenpos/application/table/TableGroupService.java index 951b84a207..de654c4a2c 100644 --- a/application/src/main/java/kitchenpos/application/TableGroupService.java +++ b/application/src/main/java/kitchenpos/application/table/TableGroupService.java @@ -1,7 +1,7 @@ -package kitchenpos.application; +package kitchenpos.application.table; -import kitchenpos.application.dto.request.CreateTableGroupDto; -import kitchenpos.application.dto.response.TableGroupDto; +import kitchenpos.application.table.dto.request.CreateTableGroupDto; +import kitchenpos.application.table.dto.response.TableGroupDto; import kitchenpos.common.domain.order.OrderStatus; import kitchenpos.common.repository.order.OrderRepository; import kitchenpos.common.repository.table.OrderTableRepository; diff --git a/application/src/main/java/kitchenpos/application/TableService.java b/application/src/main/java/kitchenpos/application/table/TableService.java similarity index 88% rename from application/src/main/java/kitchenpos/application/TableService.java rename to application/src/main/java/kitchenpos/application/table/TableService.java index 619e4d38b1..6a1ba0389b 100644 --- a/application/src/main/java/kitchenpos/application/TableService.java +++ b/application/src/main/java/kitchenpos/application/table/TableService.java @@ -1,10 +1,10 @@ -package kitchenpos.application; +package kitchenpos.application.table; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateTableDto; -import kitchenpos.application.dto.request.EmptyTableDto; -import kitchenpos.application.dto.response.TableDto; -import kitchenpos.application.dto.request.UpdateGuestNumberDto; +import kitchenpos.application.table.dto.request.CreateTableDto; +import kitchenpos.application.table.dto.request.EmptyTableDto; +import kitchenpos.application.table.dto.response.TableDto; +import kitchenpos.application.table.dto.request.UpdateGuestNumberDto; import kitchenpos.common.domain.order.OrderStatus; import kitchenpos.common.repository.order.OrderRepository; import kitchenpos.common.repository.table.OrderTableRepository; diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java b/application/src/main/java/kitchenpos/application/table/dto/request/CreateTableDto.java similarity index 88% rename from application/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java rename to application/src/main/java/kitchenpos/application/table/dto/request/CreateTableDto.java index 16cbf390b8..7bea33cee9 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateTableDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/request/CreateTableDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.table.dto.request; public class CreateTableDto { diff --git a/application/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java b/application/src/main/java/kitchenpos/application/table/dto/request/CreateTableGroupDto.java similarity index 90% rename from application/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java rename to application/src/main/java/kitchenpos/application/table/dto/request/CreateTableGroupDto.java index 5f5868e000..842cf3b60e 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/CreateTableGroupDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/request/CreateTableGroupDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.table.dto.request; import java.util.List; import org.springframework.util.CollectionUtils; diff --git a/application/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java b/application/src/main/java/kitchenpos/application/table/dto/request/EmptyTableDto.java similarity index 88% rename from application/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java rename to application/src/main/java/kitchenpos/application/table/dto/request/EmptyTableDto.java index 815b7016b0..115d8eba25 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/EmptyTableDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/request/EmptyTableDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.table.dto.request; public class EmptyTableDto { diff --git a/application/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java b/application/src/main/java/kitchenpos/application/table/dto/request/UpdateGuestNumberDto.java similarity index 89% rename from application/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java rename to application/src/main/java/kitchenpos/application/table/dto/request/UpdateGuestNumberDto.java index b24a82d59d..4e0c9a4bc5 100644 --- a/application/src/main/java/kitchenpos/application/dto/request/UpdateGuestNumberDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/request/UpdateGuestNumberDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.request; +package kitchenpos.application.table.dto.request; public class UpdateGuestNumberDto { diff --git a/application/src/main/java/kitchenpos/application/dto/response/TableDto.java b/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java similarity index 94% rename from application/src/main/java/kitchenpos/application/dto/response/TableDto.java rename to application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java index b7327fc14a..bda3d9cc64 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/TableDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.table.dto.response; import kitchenpos.common.domain.table.OrderTable; diff --git a/application/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java b/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java similarity index 95% rename from application/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java rename to application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java index d0a61482ef..79dd93f8f0 100644 --- a/application/src/main/java/kitchenpos/application/dto/response/TableGroupDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java @@ -1,4 +1,4 @@ -package kitchenpos.application.dto.response; +package kitchenpos.application.table.dto.response; import java.time.LocalDateTime; import java.util.List; diff --git a/application/src/test/java/kitchenpos/application/MenuGroupServiceTest.java b/application/src/test/java/kitchenpos/application/menu/MenuGroupServiceTest.java similarity index 82% rename from application/src/test/java/kitchenpos/application/MenuGroupServiceTest.java rename to application/src/test/java/kitchenpos/application/menu/MenuGroupServiceTest.java index cf7769fb16..c0bb5b2e19 100644 --- a/application/src/test/java/kitchenpos/application/MenuGroupServiceTest.java +++ b/application/src/test/java/kitchenpos/application/menu/MenuGroupServiceTest.java @@ -1,11 +1,11 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertAll; import java.util.List; -import kitchenpos.application.dto.request.CreateMenuGroupDto; -import kitchenpos.application.dto.response.MenuGroupDto; +import kitchenpos.application.menu.dto.request.CreateMenuGroupDto; +import kitchenpos.application.menu.dto.response.MenuGroupDto; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; diff --git a/application/src/test/java/kitchenpos/application/MenuServiceTest.java b/application/src/test/java/kitchenpos/application/menu/MenuServiceTest.java similarity index 92% rename from application/src/test/java/kitchenpos/application/MenuServiceTest.java rename to application/src/test/java/kitchenpos/application/menu/MenuServiceTest.java index 9c166d63b9..f91f598ea2 100644 --- a/application/src/test/java/kitchenpos/application/MenuServiceTest.java +++ b/application/src/test/java/kitchenpos/application/menu/MenuServiceTest.java @@ -1,14 +1,14 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertAll; import java.math.BigDecimal; import java.util.List; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; -import kitchenpos.application.dto.response.MenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; +import kitchenpos.application.menu.dto.response.MenuDto; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/application/src/test/java/kitchenpos/application/ProductServiceTest.java b/application/src/test/java/kitchenpos/application/menu/ProductServiceTest.java similarity index 92% rename from application/src/test/java/kitchenpos/application/ProductServiceTest.java rename to application/src/test/java/kitchenpos/application/menu/ProductServiceTest.java index 384455de4b..19e083976c 100644 --- a/application/src/test/java/kitchenpos/application/ProductServiceTest.java +++ b/application/src/test/java/kitchenpos/application/menu/ProductServiceTest.java @@ -1,9 +1,9 @@ -package kitchenpos.application; +package kitchenpos.application.menu; import java.math.BigDecimal; import java.util.List; -import kitchenpos.application.dto.request.CreateProductDto; -import kitchenpos.application.dto.response.ProductDto; +import kitchenpos.application.menu.dto.request.CreateProductDto; +import kitchenpos.application.menu.dto.response.ProductDto; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/application/src/test/java/kitchenpos/application/OrderServiceTest.java b/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java similarity index 89% rename from application/src/test/java/kitchenpos/application/OrderServiceTest.java rename to application/src/test/java/kitchenpos/application/order/OrderServiceTest.java index 33dcded426..e1bc7ad5c3 100644 --- a/application/src/test/java/kitchenpos/application/OrderServiceTest.java +++ b/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java @@ -1,4 +1,4 @@ -package kitchenpos.application; +package kitchenpos.application.order; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -6,13 +6,15 @@ import java.math.BigDecimal; import java.util.List; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; -import kitchenpos.application.dto.request.CreateOrderDto; -import kitchenpos.application.dto.request.CreateOrderLineItemDto; -import kitchenpos.application.dto.request.CreateTableDto; -import kitchenpos.application.dto.response.OrderDto; -import kitchenpos.application.dto.request.UpdateOrderStatusDto; +import kitchenpos.application.menu.MenuService; +import kitchenpos.application.table.TableService; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; +import kitchenpos.application.order.dto.request.CreateOrderDto; +import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; +import kitchenpos.application.table.dto.request.CreateTableDto; +import kitchenpos.application.order.dto.response.OrderDto; +import kitchenpos.application.order.dto.request.UpdateOrderStatusDto; import kitchenpos.common.domain.order.OrderStatus; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/application/src/test/java/kitchenpos/application/TableGroupServiceTest.java b/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java similarity index 89% rename from application/src/test/java/kitchenpos/application/TableGroupServiceTest.java rename to application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java index 60a076c80c..160fde9704 100644 --- a/application/src/test/java/kitchenpos/application/TableGroupServiceTest.java +++ b/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java @@ -1,4 +1,4 @@ -package kitchenpos.application; +package kitchenpos.application.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -6,13 +6,15 @@ import java.math.BigDecimal; import java.util.List; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; -import kitchenpos.application.dto.request.CreateOrderDto; -import kitchenpos.application.dto.request.CreateOrderLineItemDto; -import kitchenpos.application.dto.request.CreateTableDto; -import kitchenpos.application.dto.request.CreateTableGroupDto; -import kitchenpos.application.dto.response.TableGroupDto; +import kitchenpos.application.menu.MenuService; +import kitchenpos.application.order.OrderService; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; +import kitchenpos.application.order.dto.request.CreateOrderDto; +import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; +import kitchenpos.application.table.dto.request.CreateTableDto; +import kitchenpos.application.table.dto.request.CreateTableGroupDto; +import kitchenpos.application.table.dto.response.TableGroupDto; import kitchenpos.common.repository.table.OrderTableRepository; import kitchenpos.common.domain.table.OrderTable; import org.junit.jupiter.api.BeforeEach; diff --git a/application/src/test/java/kitchenpos/application/TableServiceTest.java b/application/src/test/java/kitchenpos/application/table/TableServiceTest.java similarity index 88% rename from application/src/test/java/kitchenpos/application/TableServiceTest.java rename to application/src/test/java/kitchenpos/application/table/TableServiceTest.java index 3e82c7f880..c28496c7dd 100644 --- a/application/src/test/java/kitchenpos/application/TableServiceTest.java +++ b/application/src/test/java/kitchenpos/application/table/TableServiceTest.java @@ -1,4 +1,4 @@ -package kitchenpos.application; +package kitchenpos.application.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -6,14 +6,16 @@ import java.math.BigDecimal; import java.util.List; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; -import kitchenpos.application.dto.request.CreateOrderDto; -import kitchenpos.application.dto.request.CreateOrderLineItemDto; -import kitchenpos.application.dto.request.CreateTableDto; -import kitchenpos.application.dto.request.EmptyTableDto; -import kitchenpos.application.dto.response.TableDto; -import kitchenpos.application.dto.request.UpdateGuestNumberDto; +import kitchenpos.application.menu.MenuService; +import kitchenpos.application.order.OrderService; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; +import kitchenpos.application.order.dto.request.CreateOrderDto; +import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; +import kitchenpos.application.table.dto.request.CreateTableDto; +import kitchenpos.application.table.dto.request.EmptyTableDto; +import kitchenpos.application.table.dto.response.TableDto; +import kitchenpos.application.table.dto.request.UpdateGuestNumberDto; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/common/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java b/common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java similarity index 89% rename from common/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java rename to common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java index 300d40c625..ef8b63ab59 100644 --- a/common/src/test/java/kitchenpos/common/repository/MenuHistoryRepositoryTest.java +++ b/common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.repository; +package kitchenpos.common.repository.menu; import static org.assertj.core.api.Assertions.assertThat; @@ -6,8 +6,6 @@ import kitchenpos.common.domain.menu.Menu; import kitchenpos.common.domain.menu.MenuHistory; import kitchenpos.common.domain.menu.Price; -import kitchenpos.common.repository.menu.MenuHistoryRepository; -import kitchenpos.common.repository.menu.MenuRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; diff --git a/ui/src/main/java/kitchenpos/ui/MenuGroupRestController.java b/ui/src/main/java/kitchenpos/ui/menu/MenuGroupRestController.java similarity index 85% rename from ui/src/main/java/kitchenpos/ui/MenuGroupRestController.java rename to ui/src/main/java/kitchenpos/ui/menu/MenuGroupRestController.java index aaa9b6075d..db7fe233c2 100644 --- a/ui/src/main/java/kitchenpos/ui/MenuGroupRestController.java +++ b/ui/src/main/java/kitchenpos/ui/menu/MenuGroupRestController.java @@ -1,8 +1,8 @@ -package kitchenpos.ui; +package kitchenpos.ui.menu; -import kitchenpos.application.MenuGroupService; -import kitchenpos.application.dto.response.MenuGroupDto; -import kitchenpos.ui.dto.MenuGroupRequestDto; +import kitchenpos.application.menu.MenuGroupService; +import kitchenpos.application.menu.dto.response.MenuGroupDto; +import kitchenpos.ui.menu.dto.MenuGroupRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/ui/src/main/java/kitchenpos/ui/MenuRestController.java b/ui/src/main/java/kitchenpos/ui/menu/MenuRestController.java similarity index 85% rename from ui/src/main/java/kitchenpos/ui/MenuRestController.java rename to ui/src/main/java/kitchenpos/ui/menu/MenuRestController.java index c0028dad88..bdab6d4130 100644 --- a/ui/src/main/java/kitchenpos/ui/MenuRestController.java +++ b/ui/src/main/java/kitchenpos/ui/menu/MenuRestController.java @@ -1,8 +1,8 @@ -package kitchenpos.ui; +package kitchenpos.ui.menu; -import kitchenpos.application.MenuService; -import kitchenpos.application.dto.response.MenuDto; -import kitchenpos.ui.dto.MenuRequestDto; +import kitchenpos.application.menu.MenuService; +import kitchenpos.application.menu.dto.response.MenuDto; +import kitchenpos.ui.menu.dto.MenuRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/ui/src/main/java/kitchenpos/ui/ProductRestController.java b/ui/src/main/java/kitchenpos/ui/menu/ProductRestController.java similarity index 85% rename from ui/src/main/java/kitchenpos/ui/ProductRestController.java rename to ui/src/main/java/kitchenpos/ui/menu/ProductRestController.java index 56cb8eccec..3d5a264ff6 100644 --- a/ui/src/main/java/kitchenpos/ui/ProductRestController.java +++ b/ui/src/main/java/kitchenpos/ui/menu/ProductRestController.java @@ -1,8 +1,8 @@ -package kitchenpos.ui; +package kitchenpos.ui.menu; -import kitchenpos.application.ProductService; -import kitchenpos.application.dto.response.ProductDto; -import kitchenpos.ui.dto.ProductRequestDto; +import kitchenpos.application.menu.ProductService; +import kitchenpos.application.menu.dto.response.ProductDto; +import kitchenpos.ui.menu.dto.ProductRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/ui/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java b/ui/src/main/java/kitchenpos/ui/menu/dto/MenuGroupRequestDto.java similarity index 73% rename from ui/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java rename to ui/src/main/java/kitchenpos/ui/menu/dto/MenuGroupRequestDto.java index b6defe797e..03aff62987 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/MenuGroupRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/menu/dto/MenuGroupRequestDto.java @@ -1,6 +1,6 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.menu.dto; -import kitchenpos.application.dto.request.CreateMenuGroupDto; +import kitchenpos.application.menu.dto.request.CreateMenuGroupDto; public class MenuGroupRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java b/ui/src/main/java/kitchenpos/ui/menu/dto/MenuRequestDto.java similarity index 89% rename from ui/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java rename to ui/src/main/java/kitchenpos/ui/menu/dto/MenuRequestDto.java index e8bcd181fb..db2af58a0d 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/MenuRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/menu/dto/MenuRequestDto.java @@ -1,10 +1,10 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.menu.dto; import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateMenuDto; -import kitchenpos.application.dto.request.CreateMenuProductDto; +import kitchenpos.application.menu.dto.request.CreateMenuDto; +import kitchenpos.application.menu.dto.request.CreateMenuProductDto; public class MenuRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java b/ui/src/main/java/kitchenpos/ui/menu/dto/ProductRequestDto.java similarity index 80% rename from ui/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java rename to ui/src/main/java/kitchenpos/ui/menu/dto/ProductRequestDto.java index 777305ee3d..30c6ef9f44 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/ProductRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/menu/dto/ProductRequestDto.java @@ -1,7 +1,7 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.menu.dto; import java.math.BigDecimal; -import kitchenpos.application.dto.request.CreateProductDto; +import kitchenpos.application.menu.dto.request.CreateProductDto; public class ProductRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/OrderRestController.java b/ui/src/main/java/kitchenpos/ui/order/OrderRestController.java similarity index 83% rename from ui/src/main/java/kitchenpos/ui/OrderRestController.java rename to ui/src/main/java/kitchenpos/ui/order/OrderRestController.java index 9af2941fdc..35698a7af3 100644 --- a/ui/src/main/java/kitchenpos/ui/OrderRestController.java +++ b/ui/src/main/java/kitchenpos/ui/order/OrderRestController.java @@ -1,9 +1,9 @@ -package kitchenpos.ui; +package kitchenpos.ui.order; -import kitchenpos.application.OrderService; -import kitchenpos.application.dto.response.OrderDto; -import kitchenpos.ui.dto.OrderRequestDto; -import kitchenpos.ui.dto.OrderStatusRequestDto; +import kitchenpos.application.order.OrderService; +import kitchenpos.application.order.dto.response.OrderDto; +import kitchenpos.ui.order.dto.OrderRequestDto; +import kitchenpos.ui.order.dto.OrderStatusRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/ui/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java b/ui/src/main/java/kitchenpos/ui/order/dto/OrderRequestDto.java similarity index 86% rename from ui/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java rename to ui/src/main/java/kitchenpos/ui/order/dto/OrderRequestDto.java index 5ea4b2858c..d3cf7f47fa 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/OrderRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/order/dto/OrderRequestDto.java @@ -1,9 +1,9 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.order.dto; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateOrderDto; -import kitchenpos.application.dto.request.CreateOrderLineItemDto; +import kitchenpos.application.order.dto.request.CreateOrderDto; +import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; public class OrderRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java b/ui/src/main/java/kitchenpos/ui/order/dto/OrderStatusRequestDto.java similarity index 76% rename from ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java rename to ui/src/main/java/kitchenpos/ui/order/dto/OrderStatusRequestDto.java index bc7b26afca..231028b098 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/OrderStatusRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/order/dto/OrderStatusRequestDto.java @@ -1,6 +1,6 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.order.dto; -import kitchenpos.application.dto.request.UpdateOrderStatusDto; +import kitchenpos.application.order.dto.request.UpdateOrderStatusDto; public class OrderStatusRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/TableGroupRestController.java b/ui/src/main/java/kitchenpos/ui/table/TableGroupRestController.java similarity index 83% rename from ui/src/main/java/kitchenpos/ui/TableGroupRestController.java rename to ui/src/main/java/kitchenpos/ui/table/TableGroupRestController.java index 461651c1a7..cf89c5af7f 100644 --- a/ui/src/main/java/kitchenpos/ui/TableGroupRestController.java +++ b/ui/src/main/java/kitchenpos/ui/table/TableGroupRestController.java @@ -1,8 +1,8 @@ -package kitchenpos.ui; +package kitchenpos.ui.table; -import kitchenpos.application.TableGroupService; -import kitchenpos.application.dto.response.TableGroupDto; -import kitchenpos.ui.dto.TableGroupsRequestDto; +import kitchenpos.application.table.TableGroupService; +import kitchenpos.application.table.dto.response.TableGroupDto; +import kitchenpos.ui.table.dto.TableGroupsRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/ui/src/main/java/kitchenpos/ui/TableRestController.java b/ui/src/main/java/kitchenpos/ui/table/TableRestController.java similarity index 82% rename from ui/src/main/java/kitchenpos/ui/TableRestController.java rename to ui/src/main/java/kitchenpos/ui/table/TableRestController.java index 39418bd071..71244f32bc 100644 --- a/ui/src/main/java/kitchenpos/ui/TableRestController.java +++ b/ui/src/main/java/kitchenpos/ui/table/TableRestController.java @@ -1,11 +1,11 @@ -package kitchenpos.ui; - -import kitchenpos.application.TableService; -import kitchenpos.application.dto.response.TableDto; -import kitchenpos.application.dto.request.UpdateGuestNumberDto; -import kitchenpos.ui.dto.EmptyTableRequestDto; -import kitchenpos.ui.dto.TableGuestNumberRequestDto; -import kitchenpos.ui.dto.TableRequestDto; +package kitchenpos.ui.table; + +import kitchenpos.application.table.TableService; +import kitchenpos.application.table.dto.response.TableDto; +import kitchenpos.application.table.dto.request.UpdateGuestNumberDto; +import kitchenpos.ui.table.dto.EmptyTableRequestDto; +import kitchenpos.ui.table.dto.TableGuestNumberRequestDto; +import kitchenpos.ui.table.dto.TableRequestDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/ui/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java b/ui/src/main/java/kitchenpos/ui/table/dto/EmptyTableRequestDto.java similarity index 75% rename from ui/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java rename to ui/src/main/java/kitchenpos/ui/table/dto/EmptyTableRequestDto.java index 835c37dae0..acbc758579 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/EmptyTableRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/table/dto/EmptyTableRequestDto.java @@ -1,6 +1,6 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.table.dto; -import kitchenpos.application.dto.request.EmptyTableDto; +import kitchenpos.application.table.dto.request.EmptyTableDto; public class EmptyTableRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java b/ui/src/main/java/kitchenpos/ui/table/dto/TableGroupsRequestDto.java similarity index 87% rename from ui/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java rename to ui/src/main/java/kitchenpos/ui/table/dto/TableGroupsRequestDto.java index de826e0977..62cfd3f228 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/TableGroupsRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/table/dto/TableGroupsRequestDto.java @@ -1,8 +1,8 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.table.dto; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.application.dto.request.CreateTableGroupDto; +import kitchenpos.application.table.dto.request.CreateTableGroupDto; public class TableGroupsRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java b/ui/src/main/java/kitchenpos/ui/table/dto/TableGuestNumberRequestDto.java similarity index 77% rename from ui/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java rename to ui/src/main/java/kitchenpos/ui/table/dto/TableGuestNumberRequestDto.java index ef45d36e88..d5290e5e46 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/TableGuestNumberRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/table/dto/TableGuestNumberRequestDto.java @@ -1,6 +1,6 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.table.dto; -import kitchenpos.application.dto.request.UpdateGuestNumberDto; +import kitchenpos.application.table.dto.request.UpdateGuestNumberDto; public class TableGuestNumberRequestDto { diff --git a/ui/src/main/java/kitchenpos/ui/dto/TableRequestDto.java b/ui/src/main/java/kitchenpos/ui/table/dto/TableRequestDto.java similarity index 80% rename from ui/src/main/java/kitchenpos/ui/dto/TableRequestDto.java rename to ui/src/main/java/kitchenpos/ui/table/dto/TableRequestDto.java index e4f42c8084..cdcd65f180 100644 --- a/ui/src/main/java/kitchenpos/ui/dto/TableRequestDto.java +++ b/ui/src/main/java/kitchenpos/ui/table/dto/TableRequestDto.java @@ -1,6 +1,6 @@ -package kitchenpos.ui.dto; +package kitchenpos.ui.table.dto; -import kitchenpos.application.dto.request.CreateTableDto; +import kitchenpos.application.table.dto.request.CreateTableDto; public class TableRequestDto { From 0c3855aaf1d9a8c708532b12c2d4a4825e38d534 Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 15:49:23 +0900 Subject: [PATCH 6/7] refactor: rename common module to core --- .../application/menu/MenuGroupService.java | 4 ++-- .../application/menu/MenuService.java | 20 +++++++++---------- .../application/menu/ProductService.java | 4 ++-- .../menu/dto/request/CreateMenuDto.java | 4 ++-- .../menu/dto/request/CreateProductDto.java | 2 +- .../menu/dto/response/MenuDto.java | 4 ++-- .../menu/dto/response/MenuGroupDto.java | 2 +- .../menu/dto/response/MenuProductDto.java | 2 +- .../menu/dto/response/ProductDto.java | 2 +- .../application/order/OrderService.java | 18 ++++++++--------- .../order/dto/request/OrderLineItemDto.java | 2 +- .../dto/request/UpdateOrderStatusDto.java | 2 +- .../order/dto/response/OrderDto.java | 4 ++-- .../application/table/TableGroupService.java | 14 ++++++------- .../application/table/TableService.java | 8 ++++---- .../table/dto/response/TableDto.java | 2 +- .../table/dto/response/TableGroupDto.java | 4 ++-- .../application/order/OrderServiceTest.java | 2 +- .../table/TableGroupServiceTest.java | 4 ++-- build.gradle | 4 ++-- {common => core}/build.gradle | 0 .../kitchenpos/core}/domain/menu/Menu.java | 2 +- .../core}/domain/menu/MenuGroup.java | 2 +- .../core}/domain/menu/MenuHistory.java | 2 +- .../core}/domain/menu/MenuProduct.java | 2 +- .../kitchenpos/core}/domain/menu/Price.java | 2 +- .../kitchenpos/core}/domain/menu/Product.java | 2 +- .../core}/domain/menu/ProductQuantities.java | 2 +- .../core}/domain/menu/ProductQuantity.java | 2 +- .../kitchenpos/core}/domain/order/Order.java | 4 ++-- .../core}/domain/order/OrderLineItem.java | 4 ++-- .../core}/domain/order/OrderStatus.java | 2 +- .../core}/domain/table/OrderTable.java | 2 +- .../core}/domain/table/OrderTables.java | 2 +- .../core}/domain/table/TableGroup.java | 2 +- .../repository/menu/MenuGroupRepository.java | 4 ++-- .../menu/MenuHistoryRepository.java | 6 +++--- .../menu/MenuProductRepository.java | 4 ++-- .../core}/repository/menu/MenuRepository.java | 4 ++-- .../repository/menu/ProductRepository.java | 4 ++-- .../order/OrderLineItemRepository.java | 4 ++-- .../repository/order/OrderRepository.java | 6 +++--- .../table/OrderTableRepository.java | 4 ++-- .../table/TableGroupRepository.java | 4 ++-- .../src/main/resources/application.properties | 0 .../V1__Initialize_project_tables.sql | 0 .../db/migration/V2__Insert_default_data.sql | 0 .../V3.0__Create_meny_history_table.sql | 0 ...ter_order_line_item_fk_to_menu_history.sql | 0 .../java/kitchenpos/CoreTestApplication.java | 0 .../core}/domain/menu/MenuGroupTest.java | 2 +- .../core}/domain/menu/MenuTest.java | 2 +- .../core}/domain/menu/PriceTest.java | 2 +- .../core}/domain/menu/ProductTest.java | 2 +- .../core}/domain/order/OrderTest.java | 4 ++-- .../core}/domain/table/OrderTableTest.java | 2 +- .../core}/domain/table/OrderTablesTest.java | 2 +- .../menu/MenuHistoryRepositoryTest.java | 8 ++++---- settings.gradle | 2 +- 59 files changed, 103 insertions(+), 103 deletions(-) rename {common => core}/build.gradle (100%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/Menu.java (97%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/MenuGroup.java (95%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/MenuHistory.java (97%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/MenuProduct.java (96%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/Price.java (95%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/Product.java (96%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/ProductQuantities.java (94%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/menu/ProductQuantity.java (93%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/order/Order.java (95%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/order/OrderLineItem.java (92%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/order/OrderStatus.java (84%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/table/OrderTable.java (97%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/table/OrderTables.java (96%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/domain/table/TableGroup.java (94%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/menu/MenuGroupRepository.java (74%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/menu/MenuHistoryRepository.java (79%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/menu/MenuProductRepository.java (75%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/menu/MenuRepository.java (84%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/menu/ProductRepository.java (83%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/order/OrderLineItemRepository.java (75%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/order/OrderRepository.java (82%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/table/OrderTableRepository.java (86%) rename {common/src/main/java/kitchenpos/common => core/src/main/java/kitchenpos/core}/repository/table/TableGroupRepository.java (71%) rename {common => core}/src/main/resources/application.properties (100%) rename {common => core}/src/main/resources/db/migration/V1__Initialize_project_tables.sql (100%) rename {common => core}/src/main/resources/db/migration/V2__Insert_default_data.sql (100%) rename {common => core}/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql (100%) rename {common => core}/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql (100%) rename {common => core}/src/test/java/kitchenpos/CoreTestApplication.java (100%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/menu/MenuGroupTest.java (91%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/menu/MenuTest.java (94%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/menu/PriceTest.java (91%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/menu/ProductTest.java (96%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/order/OrderTest.java (95%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/table/OrderTableTest.java (98%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/domain/table/OrderTablesTest.java (98%) rename {common/src/test/java/kitchenpos/common => core/src/test/java/kitchenpos/core}/repository/menu/MenuHistoryRepositoryTest.java (87%) diff --git a/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java b/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java index ca9bf945ed..121a4bfd74 100644 --- a/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java +++ b/application/src/main/java/kitchenpos/application/menu/MenuGroupService.java @@ -3,8 +3,8 @@ import java.util.stream.Collectors; import kitchenpos.application.menu.dto.request.CreateMenuGroupDto; import kitchenpos.application.menu.dto.response.MenuGroupDto; -import kitchenpos.common.domain.menu.MenuGroup; -import kitchenpos.common.repository.menu.MenuGroupRepository; +import kitchenpos.core.domain.menu.MenuGroup; +import kitchenpos.core.repository.menu.MenuGroupRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/application/src/main/java/kitchenpos/application/menu/MenuService.java b/application/src/main/java/kitchenpos/application/menu/MenuService.java index d06090ef86..b1e8e8cee6 100644 --- a/application/src/main/java/kitchenpos/application/menu/MenuService.java +++ b/application/src/main/java/kitchenpos/application/menu/MenuService.java @@ -5,16 +5,16 @@ import kitchenpos.application.menu.dto.request.CreateMenuDto; import kitchenpos.application.menu.dto.request.CreateMenuProductDto; import kitchenpos.application.menu.dto.response.MenuDto; -import kitchenpos.common.domain.menu.MenuHistory; -import kitchenpos.common.domain.menu.MenuProduct; -import kitchenpos.common.domain.menu.ProductQuantities; -import kitchenpos.common.repository.menu.MenuGroupRepository; -import kitchenpos.common.repository.menu.MenuHistoryRepository; -import kitchenpos.common.repository.menu.MenuProductRepository; -import kitchenpos.common.repository.menu.MenuRepository; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.ProductQuantity; -import kitchenpos.common.repository.menu.ProductRepository; +import kitchenpos.core.domain.menu.MenuHistory; +import kitchenpos.core.domain.menu.MenuProduct; +import kitchenpos.core.domain.menu.ProductQuantities; +import kitchenpos.core.repository.menu.MenuGroupRepository; +import kitchenpos.core.repository.menu.MenuHistoryRepository; +import kitchenpos.core.repository.menu.MenuProductRepository; +import kitchenpos.core.repository.menu.MenuRepository; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.ProductQuantity; +import kitchenpos.core.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/application/src/main/java/kitchenpos/application/menu/ProductService.java b/application/src/main/java/kitchenpos/application/menu/ProductService.java index dd6e6e120e..99fb10af63 100644 --- a/application/src/main/java/kitchenpos/application/menu/ProductService.java +++ b/application/src/main/java/kitchenpos/application/menu/ProductService.java @@ -3,8 +3,8 @@ import java.util.stream.Collectors; import kitchenpos.application.menu.dto.request.CreateProductDto; import kitchenpos.application.menu.dto.response.ProductDto; -import kitchenpos.common.domain.menu.Product; -import kitchenpos.common.repository.menu.ProductRepository; +import kitchenpos.core.domain.menu.Product; +import kitchenpos.core.repository.menu.ProductRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java index a054276389..2d306ea732 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateMenuDto.java @@ -2,8 +2,8 @@ import java.math.BigDecimal; import java.util.List; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.ProductQuantities; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.ProductQuantities; public class CreateMenuDto { diff --git a/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java index 23ff77e938..dda053201f 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/request/CreateProductDto.java @@ -1,7 +1,7 @@ package kitchenpos.application.menu.dto.request; import java.math.BigDecimal; -import kitchenpos.common.domain.menu.Product; +import kitchenpos.core.domain.menu.Product; public class CreateProductDto { diff --git a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java index 32b12d57ec..b80127ad8a 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuDto.java @@ -3,8 +3,8 @@ import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.MenuProduct; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.MenuProduct; public class MenuDto { diff --git a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java index e7e084bea9..897c4c93fa 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuGroupDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.menu.dto.response; -import kitchenpos.common.domain.menu.MenuGroup; +import kitchenpos.core.domain.menu.MenuGroup; public class MenuGroupDto { diff --git a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java index f1bb49ad43..9d80db48e9 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/MenuProductDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.menu.dto.response; -import kitchenpos.common.domain.menu.MenuProduct; +import kitchenpos.core.domain.menu.MenuProduct; public class MenuProductDto { diff --git a/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java b/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java index c9e5e58983..dac72b293a 100644 --- a/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java +++ b/application/src/main/java/kitchenpos/application/menu/dto/response/ProductDto.java @@ -1,7 +1,7 @@ package kitchenpos.application.menu.dto.response; import java.math.BigDecimal; -import kitchenpos.common.domain.menu.Product; +import kitchenpos.core.domain.menu.Product; public class ProductDto { diff --git a/application/src/main/java/kitchenpos/application/order/OrderService.java b/application/src/main/java/kitchenpos/application/order/OrderService.java index ffcdc05ec6..910c68394d 100644 --- a/application/src/main/java/kitchenpos/application/order/OrderService.java +++ b/application/src/main/java/kitchenpos/application/order/OrderService.java @@ -5,15 +5,15 @@ import kitchenpos.application.order.dto.request.CreateOrderLineItemDto; import kitchenpos.application.order.dto.response.OrderDto; import kitchenpos.application.order.dto.request.UpdateOrderStatusDto; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.MenuHistory; -import kitchenpos.common.repository.menu.MenuHistoryRepository; -import kitchenpos.common.repository.menu.MenuRepository; -import kitchenpos.common.domain.order.Order; -import kitchenpos.common.domain.order.OrderLineItem; -import kitchenpos.common.repository.order.OrderLineItemRepository; -import kitchenpos.common.repository.order.OrderRepository; -import kitchenpos.common.repository.table.OrderTableRepository; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.MenuHistory; +import kitchenpos.core.repository.menu.MenuHistoryRepository; +import kitchenpos.core.repository.menu.MenuRepository; +import kitchenpos.core.domain.order.Order; +import kitchenpos.core.domain.order.OrderLineItem; +import kitchenpos.core.repository.order.OrderLineItemRepository; +import kitchenpos.core.repository.order.OrderRepository; +import kitchenpos.core.repository.table.OrderTableRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; diff --git a/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java index 6c57f25640..5e65636869 100644 --- a/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/OrderLineItemDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.order.dto.request; -import kitchenpos.common.domain.order.OrderLineItem; +import kitchenpos.core.domain.order.OrderLineItem; public class OrderLineItemDto { diff --git a/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java b/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java index f49a174be9..6d7f8b6be5 100644 --- a/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/request/UpdateOrderStatusDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.order.dto.request; -import kitchenpos.common.domain.order.OrderStatus; +import kitchenpos.core.domain.order.OrderStatus; public class UpdateOrderStatusDto { diff --git a/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java b/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java index 5aeea3e1c1..8e93c0b627 100644 --- a/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java +++ b/application/src/main/java/kitchenpos/application/order/dto/response/OrderDto.java @@ -4,8 +4,8 @@ import java.util.List; import java.util.stream.Collectors; import kitchenpos.application.order.dto.request.OrderLineItemDto; -import kitchenpos.common.domain.order.Order; -import kitchenpos.common.domain.order.OrderLineItem; +import kitchenpos.core.domain.order.Order; +import kitchenpos.core.domain.order.OrderLineItem; public class OrderDto { diff --git a/application/src/main/java/kitchenpos/application/table/TableGroupService.java b/application/src/main/java/kitchenpos/application/table/TableGroupService.java index de654c4a2c..ce036d2bee 100644 --- a/application/src/main/java/kitchenpos/application/table/TableGroupService.java +++ b/application/src/main/java/kitchenpos/application/table/TableGroupService.java @@ -2,13 +2,13 @@ import kitchenpos.application.table.dto.request.CreateTableGroupDto; import kitchenpos.application.table.dto.response.TableGroupDto; -import kitchenpos.common.domain.order.OrderStatus; -import kitchenpos.common.repository.order.OrderRepository; -import kitchenpos.common.repository.table.OrderTableRepository; -import kitchenpos.common.repository.table.TableGroupRepository; -import kitchenpos.common.domain.table.OrderTable; -import kitchenpos.common.domain.table.OrderTables; -import kitchenpos.common.domain.table.TableGroup; +import kitchenpos.core.domain.order.OrderStatus; +import kitchenpos.core.repository.order.OrderRepository; +import kitchenpos.core.repository.table.OrderTableRepository; +import kitchenpos.core.repository.table.TableGroupRepository; +import kitchenpos.core.domain.table.OrderTable; +import kitchenpos.core.domain.table.OrderTables; +import kitchenpos.core.domain.table.TableGroup; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/application/src/main/java/kitchenpos/application/table/TableService.java b/application/src/main/java/kitchenpos/application/table/TableService.java index 6a1ba0389b..9a63392c00 100644 --- a/application/src/main/java/kitchenpos/application/table/TableService.java +++ b/application/src/main/java/kitchenpos/application/table/TableService.java @@ -5,10 +5,10 @@ import kitchenpos.application.table.dto.request.EmptyTableDto; import kitchenpos.application.table.dto.response.TableDto; import kitchenpos.application.table.dto.request.UpdateGuestNumberDto; -import kitchenpos.common.domain.order.OrderStatus; -import kitchenpos.common.repository.order.OrderRepository; -import kitchenpos.common.repository.table.OrderTableRepository; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.domain.order.OrderStatus; +import kitchenpos.core.repository.order.OrderRepository; +import kitchenpos.core.repository.table.OrderTableRepository; +import kitchenpos.core.domain.table.OrderTable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java b/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java index bda3d9cc64..68fdc22607 100644 --- a/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/response/TableDto.java @@ -1,6 +1,6 @@ package kitchenpos.application.table.dto.response; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.domain.table.OrderTable; public class TableDto { diff --git a/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java b/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java index 79dd93f8f0..a957bff411 100644 --- a/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java +++ b/application/src/main/java/kitchenpos/application/table/dto/response/TableGroupDto.java @@ -3,8 +3,8 @@ import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -import kitchenpos.common.domain.table.OrderTable; -import kitchenpos.common.domain.table.TableGroup; +import kitchenpos.core.domain.table.OrderTable; +import kitchenpos.core.domain.table.TableGroup; public class TableGroupDto { diff --git a/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java b/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java index e1bc7ad5c3..bc691eb7b2 100644 --- a/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java +++ b/application/src/test/java/kitchenpos/application/order/OrderServiceTest.java @@ -15,7 +15,7 @@ import kitchenpos.application.table.dto.request.CreateTableDto; import kitchenpos.application.order.dto.response.OrderDto; import kitchenpos.application.order.dto.request.UpdateOrderStatusDto; -import kitchenpos.common.domain.order.OrderStatus; +import kitchenpos.core.domain.order.OrderStatus; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java b/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java index 160fde9704..0921cd90a5 100644 --- a/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java +++ b/application/src/test/java/kitchenpos/application/table/TableGroupServiceTest.java @@ -15,8 +15,8 @@ import kitchenpos.application.table.dto.request.CreateTableDto; import kitchenpos.application.table.dto.request.CreateTableGroupDto; import kitchenpos.application.table.dto.response.TableGroupDto; -import kitchenpos.common.repository.table.OrderTableRepository; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.repository.table.OrderTableRepository; +import kitchenpos.core.domain.table.OrderTable; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/build.gradle b/build.gradle index 7ba2b93ef3..584a25f22f 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ project(':ui') { project(':application') { dependencies { - implementation project(':common') - testImplementation project(':common') + implementation project(':core') + testImplementation project(':core') } } diff --git a/common/build.gradle b/core/build.gradle similarity index 100% rename from common/build.gradle rename to core/build.gradle diff --git a/common/src/main/java/kitchenpos/common/domain/menu/Menu.java b/core/src/main/java/kitchenpos/core/domain/menu/Menu.java similarity index 97% rename from common/src/main/java/kitchenpos/common/domain/menu/Menu.java rename to core/src/main/java/kitchenpos/core/domain/menu/Menu.java index e63e16a003..36fa17a2b7 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/Menu.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/Menu.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; import javax.persistence.Column; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java b/core/src/main/java/kitchenpos/core/domain/menu/MenuGroup.java similarity index 95% rename from common/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java rename to core/src/main/java/kitchenpos/core/domain/menu/MenuGroup.java index c2f9d55146..5ec59ef36e 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/MenuGroup.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/MenuGroup.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java b/core/src/main/java/kitchenpos/core/domain/menu/MenuHistory.java similarity index 97% rename from common/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java rename to core/src/main/java/kitchenpos/core/domain/menu/MenuHistory.java index 577129ebfb..7fc069ba6a 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/MenuHistory.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/MenuHistory.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; import java.time.LocalDateTime; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java b/core/src/main/java/kitchenpos/core/domain/menu/MenuProduct.java similarity index 96% rename from common/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java rename to core/src/main/java/kitchenpos/core/domain/menu/MenuProduct.java index 0e53939f65..7ba71f8e7d 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/MenuProduct.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/MenuProduct.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/Price.java b/core/src/main/java/kitchenpos/core/domain/menu/Price.java similarity index 95% rename from common/src/main/java/kitchenpos/common/domain/menu/Price.java rename to core/src/main/java/kitchenpos/core/domain/menu/Price.java index b49f3d8f0d..cc88e49ff8 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/Price.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/Price.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; import javax.persistence.Column; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/Product.java b/core/src/main/java/kitchenpos/core/domain/menu/Product.java similarity index 96% rename from common/src/main/java/kitchenpos/common/domain/menu/Product.java rename to core/src/main/java/kitchenpos/core/domain/menu/Product.java index 83eee310d1..7bd7fa726c 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/Product.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/Product.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; import javax.persistence.Column; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java b/core/src/main/java/kitchenpos/core/domain/menu/ProductQuantities.java similarity index 94% rename from common/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java rename to core/src/main/java/kitchenpos/core/domain/menu/ProductQuantities.java index 7a20ae49c2..0944319ac3 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantities.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/ProductQuantities.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; import java.util.List; diff --git a/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java b/core/src/main/java/kitchenpos/core/domain/menu/ProductQuantity.java similarity index 93% rename from common/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java rename to core/src/main/java/kitchenpos/core/domain/menu/ProductQuantity.java index b8b54ff342..b0d189a79f 100644 --- a/common/src/main/java/kitchenpos/common/domain/menu/ProductQuantity.java +++ b/core/src/main/java/kitchenpos/core/domain/menu/ProductQuantity.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import java.math.BigDecimal; diff --git a/common/src/main/java/kitchenpos/common/domain/order/Order.java b/core/src/main/java/kitchenpos/core/domain/order/Order.java similarity index 95% rename from common/src/main/java/kitchenpos/common/domain/order/Order.java rename to core/src/main/java/kitchenpos/core/domain/order/Order.java index 66b0364b27..17f0fb2999 100644 --- a/common/src/main/java/kitchenpos/common/domain/order/Order.java +++ b/core/src/main/java/kitchenpos/core/domain/order/Order.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.order; +package kitchenpos.core.domain.order; import java.time.LocalDateTime; import javax.persistence.Column; @@ -9,7 +9,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.domain.table.OrderTable; @Table(name = "orders") @Entity diff --git a/common/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java b/core/src/main/java/kitchenpos/core/domain/order/OrderLineItem.java similarity index 92% rename from common/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java rename to core/src/main/java/kitchenpos/core/domain/order/OrderLineItem.java index 756de305b9..5e4a1899f1 100644 --- a/common/src/main/java/kitchenpos/common/domain/order/OrderLineItem.java +++ b/core/src/main/java/kitchenpos/core/domain/order/OrderLineItem.java @@ -1,11 +1,11 @@ -package kitchenpos.common.domain.order; +package kitchenpos.core.domain.order; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import kitchenpos.common.domain.menu.MenuHistory; +import kitchenpos.core.domain.menu.MenuHistory; @Entity public class OrderLineItem { diff --git a/common/src/main/java/kitchenpos/common/domain/order/OrderStatus.java b/core/src/main/java/kitchenpos/core/domain/order/OrderStatus.java similarity index 84% rename from common/src/main/java/kitchenpos/common/domain/order/OrderStatus.java rename to core/src/main/java/kitchenpos/core/domain/order/OrderStatus.java index 945c87fdc3..40b1ed651a 100644 --- a/common/src/main/java/kitchenpos/common/domain/order/OrderStatus.java +++ b/core/src/main/java/kitchenpos/core/domain/order/OrderStatus.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.order; +package kitchenpos.core.domain.order; import java.util.Arrays; import java.util.List; diff --git a/common/src/main/java/kitchenpos/common/domain/table/OrderTable.java b/core/src/main/java/kitchenpos/core/domain/table/OrderTable.java similarity index 97% rename from common/src/main/java/kitchenpos/common/domain/table/OrderTable.java rename to core/src/main/java/kitchenpos/core/domain/table/OrderTable.java index 67c55c04ea..281a663669 100644 --- a/common/src/main/java/kitchenpos/common/domain/table/OrderTable.java +++ b/core/src/main/java/kitchenpos/core/domain/table/OrderTable.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.table; +package kitchenpos.core.domain.table; import java.util.Objects; import javax.persistence.Column; diff --git a/common/src/main/java/kitchenpos/common/domain/table/OrderTables.java b/core/src/main/java/kitchenpos/core/domain/table/OrderTables.java similarity index 96% rename from common/src/main/java/kitchenpos/common/domain/table/OrderTables.java rename to core/src/main/java/kitchenpos/core/domain/table/OrderTables.java index 55ac920573..f7f76d297a 100644 --- a/common/src/main/java/kitchenpos/common/domain/table/OrderTables.java +++ b/core/src/main/java/kitchenpos/core/domain/table/OrderTables.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.table; +package kitchenpos.core.domain.table; import java.util.List; diff --git a/common/src/main/java/kitchenpos/common/domain/table/TableGroup.java b/core/src/main/java/kitchenpos/core/domain/table/TableGroup.java similarity index 94% rename from common/src/main/java/kitchenpos/common/domain/table/TableGroup.java rename to core/src/main/java/kitchenpos/core/domain/table/TableGroup.java index b99cf28847..bb97c602d8 100644 --- a/common/src/main/java/kitchenpos/common/domain/table/TableGroup.java +++ b/core/src/main/java/kitchenpos/core/domain/table/TableGroup.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.table; +package kitchenpos.core.domain.table; import java.time.LocalDateTime; import javax.persistence.Column; diff --git a/common/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java b/core/src/main/java/kitchenpos/core/repository/menu/MenuGroupRepository.java similarity index 74% rename from common/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java rename to core/src/main/java/kitchenpos/core/repository/menu/MenuGroupRepository.java index d016aca741..16917f563c 100644 --- a/common/src/main/java/kitchenpos/common/repository/menu/MenuGroupRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/menu/MenuGroupRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import java.util.List; -import kitchenpos.common.domain.menu.MenuGroup; +import kitchenpos.core.domain.menu.MenuGroup; import org.springframework.data.repository.Repository; public interface MenuGroupRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java b/core/src/main/java/kitchenpos/core/repository/menu/MenuHistoryRepository.java similarity index 79% rename from common/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java rename to core/src/main/java/kitchenpos/core/repository/menu/MenuHistoryRepository.java index 16cda25b8f..2378bd5f54 100644 --- a/common/src/main/java/kitchenpos/common/repository/menu/MenuHistoryRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/menu/MenuHistoryRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import java.util.Optional; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.MenuHistory; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.MenuHistory; import org.springframework.data.repository.Repository; public interface MenuHistoryRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java b/core/src/main/java/kitchenpos/core/repository/menu/MenuProductRepository.java similarity index 75% rename from common/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java rename to core/src/main/java/kitchenpos/core/repository/menu/MenuProductRepository.java index e8be891484..1adacab5a5 100644 --- a/common/src/main/java/kitchenpos/common/repository/menu/MenuProductRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/menu/MenuProductRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import java.util.List; -import kitchenpos.common.domain.menu.MenuProduct; +import kitchenpos.core.domain.menu.MenuProduct; import org.springframework.data.repository.Repository; public interface MenuProductRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java b/core/src/main/java/kitchenpos/core/repository/menu/MenuRepository.java similarity index 84% rename from common/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java rename to core/src/main/java/kitchenpos/core/repository/menu/MenuRepository.java index 85fdc1af05..38ae0a2518 100644 --- a/common/src/main/java/kitchenpos/common/repository/menu/MenuRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/menu/MenuRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import java.util.List; import java.util.Optional; -import kitchenpos.common.domain.menu.Menu; +import kitchenpos.core.domain.menu.Menu; import org.springframework.data.repository.Repository; public interface MenuRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java b/core/src/main/java/kitchenpos/core/repository/menu/ProductRepository.java similarity index 83% rename from common/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java rename to core/src/main/java/kitchenpos/core/repository/menu/ProductRepository.java index 6969655ca9..34908ef04c 100644 --- a/common/src/main/java/kitchenpos/common/repository/menu/ProductRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/menu/ProductRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import java.util.List; import java.util.Optional; -import kitchenpos.common.domain.menu.Product; +import kitchenpos.core.domain.menu.Product; import org.springframework.data.repository.Repository; public interface ProductRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java b/core/src/main/java/kitchenpos/core/repository/order/OrderLineItemRepository.java similarity index 75% rename from common/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java rename to core/src/main/java/kitchenpos/core/repository/order/OrderLineItemRepository.java index c1da517516..273ae5a15a 100644 --- a/common/src/main/java/kitchenpos/common/repository/order/OrderLineItemRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/order/OrderLineItemRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.common.repository.order; +package kitchenpos.core.repository.order; import java.util.List; -import kitchenpos.common.domain.order.OrderLineItem; +import kitchenpos.core.domain.order.OrderLineItem; import org.springframework.data.repository.Repository; public interface OrderLineItemRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/order/OrderRepository.java b/core/src/main/java/kitchenpos/core/repository/order/OrderRepository.java similarity index 82% rename from common/src/main/java/kitchenpos/common/repository/order/OrderRepository.java rename to core/src/main/java/kitchenpos/core/repository/order/OrderRepository.java index fa64b09e29..40ad2d94d3 100644 --- a/common/src/main/java/kitchenpos/common/repository/order/OrderRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/order/OrderRepository.java @@ -1,9 +1,9 @@ -package kitchenpos.common.repository.order; +package kitchenpos.core.repository.order; import java.util.List; import java.util.Optional; -import kitchenpos.common.domain.order.Order; -import kitchenpos.common.domain.order.OrderStatus; +import kitchenpos.core.domain.order.Order; +import kitchenpos.core.domain.order.OrderStatus; import org.springframework.data.repository.Repository; public interface OrderRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java b/core/src/main/java/kitchenpos/core/repository/table/OrderTableRepository.java similarity index 86% rename from common/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java rename to core/src/main/java/kitchenpos/core/repository/table/OrderTableRepository.java index 2b34241689..b6b02e2daf 100644 --- a/common/src/main/java/kitchenpos/common/repository/table/OrderTableRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/table/OrderTableRepository.java @@ -1,8 +1,8 @@ -package kitchenpos.common.repository.table; +package kitchenpos.core.repository.table; import java.util.List; import java.util.Optional; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.domain.table.OrderTable; import org.springframework.data.repository.Repository; public interface OrderTableRepository extends Repository { diff --git a/common/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java b/core/src/main/java/kitchenpos/core/repository/table/TableGroupRepository.java similarity index 71% rename from common/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java rename to core/src/main/java/kitchenpos/core/repository/table/TableGroupRepository.java index 0a184423a1..44525ed85a 100644 --- a/common/src/main/java/kitchenpos/common/repository/table/TableGroupRepository.java +++ b/core/src/main/java/kitchenpos/core/repository/table/TableGroupRepository.java @@ -1,7 +1,7 @@ -package kitchenpos.common.repository.table; +package kitchenpos.core.repository.table; import java.util.List; -import kitchenpos.common.domain.table.TableGroup; +import kitchenpos.core.domain.table.TableGroup; import org.springframework.data.repository.Repository; public interface TableGroupRepository extends Repository { diff --git a/common/src/main/resources/application.properties b/core/src/main/resources/application.properties similarity index 100% rename from common/src/main/resources/application.properties rename to core/src/main/resources/application.properties diff --git a/common/src/main/resources/db/migration/V1__Initialize_project_tables.sql b/core/src/main/resources/db/migration/V1__Initialize_project_tables.sql similarity index 100% rename from common/src/main/resources/db/migration/V1__Initialize_project_tables.sql rename to core/src/main/resources/db/migration/V1__Initialize_project_tables.sql diff --git a/common/src/main/resources/db/migration/V2__Insert_default_data.sql b/core/src/main/resources/db/migration/V2__Insert_default_data.sql similarity index 100% rename from common/src/main/resources/db/migration/V2__Insert_default_data.sql rename to core/src/main/resources/db/migration/V2__Insert_default_data.sql diff --git a/common/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql b/core/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql similarity index 100% rename from common/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql rename to core/src/main/resources/db/migration/V3.0__Create_meny_history_table.sql diff --git a/common/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql b/core/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql similarity index 100% rename from common/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql rename to core/src/main/resources/db/migration/V3.1__Alter_order_line_item_fk_to_menu_history.sql diff --git a/common/src/test/java/kitchenpos/CoreTestApplication.java b/core/src/test/java/kitchenpos/CoreTestApplication.java similarity index 100% rename from common/src/test/java/kitchenpos/CoreTestApplication.java rename to core/src/test/java/kitchenpos/CoreTestApplication.java diff --git a/common/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java b/core/src/test/java/kitchenpos/core/domain/menu/MenuGroupTest.java similarity index 91% rename from common/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java rename to core/src/test/java/kitchenpos/core/domain/menu/MenuGroupTest.java index e016c8394b..f0c99d8d7e 100644 --- a/common/src/test/java/kitchenpos/common/domain/menu/MenuGroupTest.java +++ b/core/src/test/java/kitchenpos/core/domain/menu/MenuGroupTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/domain/menu/MenuTest.java b/core/src/test/java/kitchenpos/core/domain/menu/MenuTest.java similarity index 94% rename from common/src/test/java/kitchenpos/common/domain/menu/MenuTest.java rename to core/src/test/java/kitchenpos/core/domain/menu/MenuTest.java index 8fce3d5598..12108376e3 100644 --- a/common/src/test/java/kitchenpos/common/domain/menu/MenuTest.java +++ b/core/src/test/java/kitchenpos/core/domain/menu/MenuTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/domain/menu/PriceTest.java b/core/src/test/java/kitchenpos/core/domain/menu/PriceTest.java similarity index 91% rename from common/src/test/java/kitchenpos/common/domain/menu/PriceTest.java rename to core/src/test/java/kitchenpos/core/domain/menu/PriceTest.java index 45f386f959..3370e38671 100644 --- a/common/src/test/java/kitchenpos/common/domain/menu/PriceTest.java +++ b/core/src/test/java/kitchenpos/core/domain/menu/PriceTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/domain/menu/ProductTest.java b/core/src/test/java/kitchenpos/core/domain/menu/ProductTest.java similarity index 96% rename from common/src/test/java/kitchenpos/common/domain/menu/ProductTest.java rename to core/src/test/java/kitchenpos/core/domain/menu/ProductTest.java index a89d707681..7804a2bd4c 100644 --- a/common/src/test/java/kitchenpos/common/domain/menu/ProductTest.java +++ b/core/src/test/java/kitchenpos/core/domain/menu/ProductTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.menu; +package kitchenpos.core.domain.menu; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/domain/order/OrderTest.java b/core/src/test/java/kitchenpos/core/domain/order/OrderTest.java similarity index 95% rename from common/src/test/java/kitchenpos/common/domain/order/OrderTest.java rename to core/src/test/java/kitchenpos/core/domain/order/OrderTest.java index 03271edf2c..179a89ae79 100644 --- a/common/src/test/java/kitchenpos/common/domain/order/OrderTest.java +++ b/core/src/test/java/kitchenpos/core/domain/order/OrderTest.java @@ -1,10 +1,10 @@ -package kitchenpos.common.domain.order; +package kitchenpos.core.domain.order; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.time.LocalDateTime; -import kitchenpos.common.domain.table.OrderTable; +import kitchenpos.core.domain.table.OrderTable; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/common/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java b/core/src/test/java/kitchenpos/core/domain/table/OrderTableTest.java similarity index 98% rename from common/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java rename to core/src/test/java/kitchenpos/core/domain/table/OrderTableTest.java index 99bd77f9fc..ebbf8b6107 100644 --- a/common/src/test/java/kitchenpos/common/domain/table/OrderTableTest.java +++ b/core/src/test/java/kitchenpos/core/domain/table/OrderTableTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.table; +package kitchenpos.core.domain.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java b/core/src/test/java/kitchenpos/core/domain/table/OrderTablesTest.java similarity index 98% rename from common/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java rename to core/src/test/java/kitchenpos/core/domain/table/OrderTablesTest.java index 5c0581ecf2..081c608c68 100644 --- a/common/src/test/java/kitchenpos/common/domain/table/OrderTablesTest.java +++ b/core/src/test/java/kitchenpos/core/domain/table/OrderTablesTest.java @@ -1,4 +1,4 @@ -package kitchenpos.common.domain.table; +package kitchenpos.core.domain.table; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java b/core/src/test/java/kitchenpos/core/repository/menu/MenuHistoryRepositoryTest.java similarity index 87% rename from common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java rename to core/src/test/java/kitchenpos/core/repository/menu/MenuHistoryRepositoryTest.java index ef8b63ab59..c0980b6e49 100644 --- a/common/src/test/java/kitchenpos/common/repository/menu/MenuHistoryRepositoryTest.java +++ b/core/src/test/java/kitchenpos/core/repository/menu/MenuHistoryRepositoryTest.java @@ -1,11 +1,11 @@ -package kitchenpos.common.repository.menu; +package kitchenpos.core.repository.menu; import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; -import kitchenpos.common.domain.menu.Menu; -import kitchenpos.common.domain.menu.MenuHistory; -import kitchenpos.common.domain.menu.Price; +import kitchenpos.core.domain.menu.Menu; +import kitchenpos.core.domain.menu.MenuHistory; +import kitchenpos.core.domain.menu.Price; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; diff --git a/settings.gradle b/settings.gradle index fe57cad053..5906cf6183 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,3 @@ rootProject.name = 'kitchenpos' -include 'common', 'application', 'ui' +include 'core', 'application', 'ui' From b5781ae1cb40f420b7607b60a182e8fcfb689e55 Mon Sep 17 00:00:00 2001 From: Jeong Jinwoo Date: Mon, 7 Nov 2022 15:56:48 +0900 Subject: [PATCH 7/7] refactor: move gradle dependencies regarding web to ui module - cleanse build.gradle --- application/build.gradle | 3 --- build.gradle | 5 +++-- core/build.gradle | 3 --- ui/build.gradle | 3 --- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/application/build.gradle b/application/build.gradle index 09a66ff53e..408c3c4ca5 100644 --- a/application/build.gradle +++ b/application/build.gradle @@ -1,6 +1,3 @@ bootJar { enabled = false } jar { enabled = true } - -dependencies { -} diff --git a/build.gradle b/build.gradle index 584a25f22f..9bdb471d07 100644 --- a/build.gradle +++ b/build.gradle @@ -22,8 +22,6 @@ subprojects { } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.flywaydb:flyway-core' runtimeOnly 'com.h2database:h2' @@ -41,6 +39,9 @@ project(':ui') { dependencies { implementation project(':application') testImplementation project(':application') + + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-actuator' } } diff --git a/core/build.gradle b/core/build.gradle index 09a66ff53e..408c3c4ca5 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,6 +1,3 @@ bootJar { enabled = false } jar { enabled = true } - -dependencies { -} diff --git a/ui/build.gradle b/ui/build.gradle index 09a66ff53e..408c3c4ca5 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -1,6 +1,3 @@ bootJar { enabled = false } jar { enabled = true } - -dependencies { -}