Skip to content

Commit

Permalink
refactor: 포매팅 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
Invidam committed Dec 21, 2023
1 parent 66e610e commit d59e3e3
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/in/koreatech/koin/domain/shop/Menu.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@Table(name = "shop_menus")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Menu extends BaseEntity {

public static final int SINGLE_OPTION_COUNT = 1;
@Id
@Column(name = "id", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
@Table(name = "shop_menu_categories")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public final class MenuCategory extends BaseEntity {

@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@Table(name = "shop_menu_category_map")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class MenuCategoryMap {

@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
1 change: 1 addition & 0 deletions src/main/java/in/koreatech/koin/domain/shop/MenuImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@Table(name = "shop_menu_images")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class MenuImage {

@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@Table(name = "shop_menu_details")
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class MenuOption extends BaseEntity {

@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public static ShopMenuResponse createForMultipleOption(Menu menu, List<MenuCateg
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
private static class InnerOptionPriceResponse {

private final String option;
private final Integer price;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import in.koreatech.koin.domain.shop.Menu;

public interface MenuRepository extends Repository<Menu, Long> {

Optional<Menu> findById(Long menuId);

Menu save(Menu menu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
@Service
@Transactional(readOnly = true)
public class ShopService {

private final MenuRepository menuRepository;

public ShopService(MenuRepository menuRepository) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.restassured.response.Response;

class ShopApiTest extends AcceptanceTest {

@Autowired
private MenuRepository menuRepository;

Expand Down

0 comments on commit d59e3e3

Please sign in to comment.