code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋๋ฉ์ธ์์ view์ ์์กดํ๋ ํํ๋ฅผ ๋๊ณ ์์ต๋๋ค.
์ฌ์ฉ์ ์
๋ ฅ ์ฒ๋ฆฌ์ ๋ํ ๋ถ๋ถ์ `MembershipManager` ์ฒ๋ผ ์ปจํธ๋กค๋ฌ๋ก ๊บผ๋ด์ด ์ฒ๋ฆฌํ๋ ๊ฒ์ ์ด๋จ๊น์? |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ์ด ๋ฉ์๋์์, ๊ตฌ๋งคํ ์ํ๊ณผ ์๋์ ๋ฐ์, Receipt๋ฅผ ๋ง๋๋๋ฐ
์ด ๊ณผ์ ์์, ํ๋ก๋ชจ์
์ ๋ํ ๊ธฐ๋ฅ๋ค์ ์ฒ๋ฆฌํ๊ณ ์์ต๋๋ค.
์ด๋ฅผ ๋ถ๋ฆฌํ๋ฉด ์ด๋จ๊น์?
์ฌ์ฉ์๊ฐ ๊ตฌ๋งคํ ์ํ๊ณผ ์๋์ ๋ฐ์ ์ ์ฅํ๊ณ , ์ด ์ ์ฅ๋ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ํ๋ก๋ชจ์
์ ์ ์ฉํ๋ ์์๋ก์!
์ด๋ ๊ฒ ํ๋ฉด, ํ๋ก๋ชจ์
์์ธ์ฌํญ์ ๋ํ ์ฌ์ฉ์ ์
๋ ฅ์ ์ปจํธ๋กค๋ฌ๋ก ๋บ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค:) |
@@ -0,0 +1,23 @@
+package store.constants;
+
+import static store.constants.StringConstants.NEW_LINE;
+import static store.constants.StringConstants.ONE_SPACE;
+import static store.constants.StringConstants.TAP;
+
+public class OutputMessages {
+ public static String WELCOME_MESSAGE = "์๋
ํ์ธ์. Wํธ์์ ์
๋๋ค." + NEW_LINE + ... | Java | ์ด๋ ๊ฒ ์์ ํ๋์ฝ๋ฉ ๋ฌธ์์ด ๊ฐ์ ๊ฒฝ์ฐ์ ๋ํด์ ํ๊ณผ ์ ๋ฐฐ๋๊ป ๋ฌผ์ด๋ดค๋๋ฐ, ์ด๋ฐ ์์ ๋ถ๋ถ(๋ฌธ์์ด์ ์กฐ๋ฆฝํด์ผํ๋ ๋ถ๋ถ)์ ๋ง์ง ์์ผ๋ฉด ํด๋์ค ๋ด์์ ์ ์ธํ๊ณ ์ด๋ค๋ ์๊ฒฌ์ ๋ค์์ต๋๋ค! |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ๋์ํฉ๋๋ค! |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋๋ฉ์ธํด๋์ค์ ์ฃผ์์ฑ
์์ '๋๋ฉ์ธ์ ์ ํํํด๋ด๋ ๊ฒ'์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค. ํด๋น ๋๋ฉ์ธ ํด๋์ค๋ ๋ง์ ๋น์ฆ๋์ค ๋ก์ง์ ํฌํจํ๊ณ ์์ผ๋ฏ๋ก, ๋จ์ผ์ฑ
์์์น์ด ์๋ฐฐ๋ ๊ฒ ๊ฐ์ต๋๋ค! ์๋น์ค๊ณ์ธต์ ๋์
ํ๊ฑฐ๋ ์ฑ
์์ ๋ถ๋ฆฌํด๋ณด๋๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,15 @@
+package store.constants;
+
+public class StringConstants {
+ public static final String COMMA = ",";
+ public static final String DASH = "-";
+ public static final String NEW_LINE = "\n";
+ public static final String TAP = "\t";
+ public static final String OPEN_SQUARE_BRACKETS = "[";
+... | Java | ๊ผผ๊ผผํ ์์ ์ฒ๋ฆฌ! ๋ณผ ๋๋ง๋ค ๊ฐํ์ ์์๋
๋๋ค! |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ์๋ฌ ๋ฉ์์ง ์ถ๋ ฅ ๋ถ๋ถ๋ OutputView ๋ก ๋นผ์ฃผ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | setQuantity์ setPromotionPeriods ๋ฉ์๋๊ฐ ์ ์ ๋ฉ์๋๋ก ๋ณด์ด๋๋ฐ ์ ์ ๋ฉ์๋๋ ์ํ ๋ณ๊ฒฝ์ ์ฌ์ฉ๋๋ฉด ๊ฐ์ฒด์งํฅ์์น์ ๋ง์ง ์์ ์ ์ข๋ค๊ณ ์๊ณ ์์ต๋๋ค Promotion ๊ฐ์ฒด๋ฅผ ์ธ์คํด์คํํ์ฌ ๊ด๋ฆฌํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋๋ฉ์ธ์์ ๋ทฐ์ ์์กดํ๋ ํํ๋ ์ข์ง ์์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,60 @@
+package store.domain;
+
+import static camp.nextstep.edu.missionutils.DateTimes.now;
+
+import java.time.LocalDateTime;
+
+public enum Promotion {
+
+ NULL(""),
+ SPARKLING_BUY_TWO_GET_ONE_FREE("ํ์ฐ2+1"),
+ MD_RECOMMENDATION("MD์ถ์ฒ์ํ"),
+ FLASH_SALE("๋ฐ์งํ ์ธ");
+
+ private final String promo... | Java | ์ ๋ ํ๋ก๋ชจ์
์ด ๋์ ์ผ๋ก ๊ฐ์ด ๋ฐ๋ ์ ์๋ค๋ ์กฐ๊ฑด ๋๋ฌธ์ ํ๋ก๋ชจ์
๊ฐ์ด ๋ฐ๋๋ค๋ฉด ์ฝ๋๋ฅผ ์น ๋ค ๋ฐ๊ฟ์ค์ผ ํด์ enum์๋ ๋ง์ง ์๋ค๊ณ ์๊ฐํ์ต๋๋ค ์ง์ฐ๋์ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -0,0 +1,48 @@
+package store.domain;
+
+import static store.constants.NumberConstants.SINGLE_PRODUCT_QUANTITY;
+
+import java.util.ArrayList;
+import java.util.List;
+import store.exception.ProductNotExistException;
+
+public class StoreHouse {
+
+ private final List<Product> productList = new ArrayList<>();
+
+
... | Java | ์ด๋ฆ์ผ๋ก product๋ฅผ ์ฐพ์๊ฑฐ๋ผ๋ฉด List<Product>๋ณด๋ค Map<String, Product>๋ ์ด๋จ๊น์? |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋์ํฉ๋๋ค |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ๋์ํฉ๋๋ค! |
@@ -0,0 +1,115 @@
+package store.io;
+
+import static store.constants.InputMessages.ADDITIONAL_PURCHASE_MESSAGE;
+import static store.constants.InputMessages.FREEBIE_ADDITION_MESSAGE;
+import static store.constants.InputMessages.INPUT_PRODUCT_NAME_AND_QUANTITY;
+import static store.constants.InputMessages.MEMBERSHIP_DI... | Java | inputView๋ ์ฌ์ฉ์๋ก๋ถํฐ ์
๋ ฅ์ ๋ฐ๋ UI ์ญํ ๋ก, ํ์ผ์ ์ฝ๊ณ ๋ฐ์ดํฐ๋ฅผ ์ฒ๋ฆฌํ๋ ๊ณผ์ ์ parser๋ก ๋นผ์ฃผ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! (ํ์ผ ์ฝ๊ธฐ๋ FileReader๋ก, ํด๋น ํ์ผ์ ๋ฐ์ดํฐ ์ฒ๋ฆฌ๋ parser๋ก!)
์๋๋ฉด setup service๋ฅผ ๋ง๋ค์ด์ ๊ทธ๊ณณ์์ setup์ ์งํํ๊ณ controller์์ ๋ถ๋ฌ์ค๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
๊ทธ๋ฆฌ๊ณ ํ์ผ ์ฝ๊ธฐ ๊ธฐ๋ฅ์ ์ค ๋จ์๋ก ์ฝ์ด์ ์ฒ๋ฆฌํ๋ ๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด์ง๋ง, readAllLines (์ง์ฐ๋๊ป์ ๋ฆฌ๋ทฐ ํด์ฃผ์
จ๋!) ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ฉด ํ๋ฒ์ ์ฝ์ด์์ ์ฝ๋๋ฅผ ์ฝ์ด์ค๋ ๋ถ๋ถ์ ๋จ์ถ ์ํฌ ์ ์๋ต๋๋ค! |
@@ -0,0 +1,115 @@
+package store.io;
+
+import static store.constants.InputMessages.ADDITIONAL_PURCHASE_MESSAGE;
+import static store.constants.InputMessages.FREEBIE_ADDITION_MESSAGE;
+import static store.constants.InputMessages.INPUT_PRODUCT_NAME_AND_QUANTITY;
+import static store.constants.InputMessages.MEMBERSHIP_DI... | Java | ์ถ๊ฐ๋ก validator์ empty input์ ๊ฒ์ฌํ๋ ๋ฉ์๋์ ๊ฒฝ์ฐ, parser์ ํฌํจ ์ํค๋ ๊ฒ์ด ์ด๋จ๊น์?
parser๋ ์
๋ ฅ ๊ฐ์ ํด์ํ๊ณ , ์ ์ ํ ํ์์ผ๋ก ๋ณํํ๋ ์ฑ
์์ ๊ฐ์ง๋ฏ๋ก ์
๋ ฅ ๊ฐ์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ํ๋ ๊ฒ๋ ๊ทธ ์ฑ
์์ ๋ง๋ค๊ณ ์๊ฐํฉ๋๋ค! |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ๋์ํฉ๋๋ค! |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋์ํฉ๋๋ค! |
@@ -0,0 +1,23 @@
+package store.constants;
+
+import static store.constants.StringConstants.NEW_LINE;
+import static store.constants.StringConstants.ONE_SPACE;
+import static store.constants.StringConstants.TAP;
+
+public class OutputMessages {
+ public static String WELCOME_MESSAGE = "์๋
ํ์ธ์. Wํธ์์ ์
๋๋ค." + NEW_LINE + ... | Java | ์ค ๊ทธ๋ ๊ตฐ์. ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,15 @@
+package store.constants;
+
+public class StringConstants {
+ public static final String COMMA = ",";
+ public static final String DASH = "-";
+ public static final String NEW_LINE = "\n";
+ public static final String TAP = "\t";
+ public static final String OPEN_SQUARE_BRACKETS = "[";
+... | Java | ์นญ์ฐฌ,,, ๊ฐ์ฌํฉ๋๋ค ๐ฅน |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ๋์น ๋ถ๋ถ ์ง์ด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค :) |
@@ -0,0 +1,88 @@
+package store.controller;
+
+import static store.constants.InputMessages.PRODUCTS_FILE_NAME;
+import static store.constants.InputMessages.PROMOTIONS_FILE_NAME;
+
+import java.util.List;
+import store.config.IoConfig;
+import store.domain.Choice;
+import store.domain.MembershipManager;
+import store.do... | Java | ์ข์ ์๊ฒฌ ๊ฐ์ฌํฉ๋๋ค.
์ฌ์ฉ์๋ก๋ถํฐ ์
๋ ฅ์ ๋ฐ๊ณ ํ๋ฒ์ ๋ชจ๋ ๊ฑธ ์ฒ๋ฆฌํ๋ ค๊ณ ํ๋ ๊ฒ ์ค์์๋ค์.. ์ฑ
์ ๋ถ๋ฆฌ๊ฐ ๋ถ์กฑํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
๋ฆฌํฉํ ๋ง์ ์ ์ฉํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค :) |
@@ -0,0 +1,60 @@
+package store.domain;
+
+import static camp.nextstep.edu.missionutils.DateTimes.now;
+
+import java.time.LocalDateTime;
+
+public enum Promotion {
+
+ NULL(""),
+ SPARKLING_BUY_TWO_GET_ONE_FREE("ํ์ฐ2+1"),
+ MD_RECOMMENDATION("MD์ถ์ฒ์ํ"),
+ FLASH_SALE("๋ฐ์งํ ์ธ");
+
+ private final String promo... | Java | ์ข์ ์๊ฒฌ ๊ฐ์ฌํฉ๋๋ค.
@slay1379๋ ๋ฆฌ๋ทฐ์๋ ์งง๊ฒ ์์ฑํ๊ธด ํ์ง๋ง ์ถ๊ฐ๋ก ๋ง์๋๋ฆฌ์๋ฉด
ํ์ฌ null์ ์ ์ธํ๊ณ ๋ ์ฝ๋์์ ์ง์ ์ฌ์ฉํ๋ ๋ถ๋ถ์ด ์์ง๋ง, ๋ณ๋ ๊ฐ๋ฅ์ฑ์ด ๋๊ธฐ ๋๋ฌธ์ ๋ฌธ์์ด ํ์
์ผ๋ก ๊ด๋ฆฌํ๋ ํธ์ด ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. (๋ผ๊ณ ์์ฑํ๊ณ ๋ค์ ์๊ฐํด๋ณด๋ ํ
์คํธ ์ฝ๋๊ฐ ์์๋ค์...! ^^;; ํํ) |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ์ข์ ์๊ฒฌ ๊ฐ์ฌํฉ๋๋ค. ์ด๋ฒ ๋ฏธ์
์์๋ ์ฑ
์ ๋ถ๋ฆฌ์ ๋ฏธํกํ๋ ๊ฒ ๊ฐ์์.
PromotionManager์ ์ฌ์ค์ ์๋น์ค์ฒ๋ผ ์ฌ์ฉํ๊ณ ์์๋ ๊ฒ ๊ฐ๊ณ , ์๊ฒฌ ์ฐธ๊ณ ํด์ ๋ฆฌํฉํ ๋งํด๋ณด๋ ค๊ณ ํฉ๋๋ค! ๊ฐ์ฌํฉ๋๋ค :) |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋ง์ต๋๋ค... ์ธ์งํ๊ณ ์์ผ๋ฉด์๋ ๋น์ฅ ๋์๊ฐ๋ ๊ฒ ์ฐ์ ์ด์๊ธฐ์ ์ฐ๋ ๊ธฐ๋ฅผ ๋ง๋ค์๋ค์ใ
ใ
ใ
ใ
ใ
์
๋ ฅ ๋ฐ๋ ๋ถ๋ถ์ ์ ๋ถ ๋ฐ์ผ๋ก ๋นผ์ ๋ฆฌํฉํ ๋งํ ์์ ์
๋๋ค!
ํผ๋๋ฐฑ ๊ฐ์ฌํฉ๋๋ค. |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๊ทธ๋ ๊ตฐ์..! ํผ๋๋ฐฑ ๊ฐ์ฌํฉ๋๋ค. ๋ ๊ณต๋ถํด๋ณด๊ณ , ์ฐธ๊ณ ํด์ ๋ฆฌํฉํ ๋งํด๋ณด๊ฒ ์ต๋๋ค. |
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋ต ํผ๋๋ฐฑ ๊ฐ์ฌํฉ๋๋ค :)
์ผ๋จ ๋์๊ฐ๊ฒ ๋ง๋๋ ๊ฒ ๋ชฉ์ ์ด์๊ธฐ์ ์ด๋ฐ ๊ตฌ์กฐ๊ฐ ๋์๋ฒ๋ ธ๋ค์,, ใ
ใ
์
๋ ฅ ๋ฐ๋ ๋ถ๋ถ์ ์ปจํธ๋กค๋ฌ๋ก ๋นผ์ ๋ฆฌํฉํ ๋งํ ์์ ์
๋๋ค! |
@@ -0,0 +1,48 @@
+package store.domain;
+
+import static store.constants.NumberConstants.SINGLE_PRODUCT_QUANTITY;
+
+import java.util.ArrayList;
+import java.util.List;
+import store.exception.ProductNotExistException;
+
+public class StoreHouse {
+
+ private final List<Product> productList = new ArrayList<>();
+
+
... | Java | ์ ๊ทธ ๋ฐฉ๋ฒ๋ ์ข์ ๊ฒ ๊ฐ์ง๋ง, ๋์ผํ ์ด๋ฆ์ ๊ฐ์ง ์ํ์ ๋ชจ๋ ๊ฐ์ ธ์์ ๊ฐ ์ํฉ์ ๋ง๊ฒ ์ฒ๋ฆฌํ๋ ๋ก์ง์๋ List๊ฐ ๋ ์ ์ ํ ๊ฒ ๊ฐ์ต๋๋ค! ๋ค์ํ ์๋ฃ๊ตฌ์กฐ๋ฅผ ๊ณ ๋ฏผํด ๋ณผ ์ ์๊ฒ ํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค :) |
@@ -0,0 +1,115 @@
+package store.io;
+
+import static store.constants.InputMessages.ADDITIONAL_PURCHASE_MESSAGE;
+import static store.constants.InputMessages.FREEBIE_ADDITION_MESSAGE;
+import static store.constants.InputMessages.INPUT_PRODUCT_NAME_AND_QUANTITY;
+import static store.constants.InputMessages.MEMBERSHIP_DI... | Java | ๋ค์ํ ์๊ฒฌ ์ ์ํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค!!
์ง๊ธ ๋ณด๋ ๊ทธ๋ ๋ค์,, ํ์ผ์ ๋ํ ์ฒ๋ฆฌ๋ ์์ฐํ ๋ทฐ์๋ ๋ค๋ฅธ ์ฑ
์์ธ๋ฐ (๊ฐ์ ์ฝ์ด๋ค์ธ๋ค๋ ๋ถ๋ถ์ ๊ฝํ) ์ด ๋ถ๋ถ์ ๊ฐ๊ณผํ๋ ๊ฒ ๊ฐ์ต๋๋ค.์๋น์ค๋ก ๋ถ๋ฆฌํ๋ ๋ฐฉ๋ฒ๋ ์ข์ ๊ฒ ๊ฐ์์!
ํ๋ ์๊ฒฌ์ ์ฌ์ญ๊ณ ์ถ์ ๊ฒ ์๋๋ฐ, **๋ทฐ์์ ์
๋ ฅ๊ฐ์ ๋ํ ํ์ฑ์ ํ๋ ๊ฒ์ ์ด๋ป๊ฒ ์๊ฐํ์๋์ง** ๊ถ๊ธํฉ๋๋ค!
ํ์ฌ๋ ์
๋ ฅ ๋ฐ๊ธฐ+๊ฒ์ฆ+ํ์ฑ์ ๋ชจ๋ ์ํํ๊ณ ์์ด ์ฑ
์ ๋ถ๋ฆฌ๊ฐ ์ ์ด๋ฃจ์ด์ง์ง ์์ ๊ฒ ๊ฐ๋ค๊ณ ๋๊ปด์ง๋๋ค...
๋ง์ํด ์ฃผ์ ๊ฒ์ฒ๋ผ ๋น ๊ฐ์ ๊ฒ์ฆํ๋ ๋ก์ง์ parser๋ก ํฌํจ์ํจ๋ค๊ณ ํ๋ฉด, ๋ทฐ์์๋ ์
๋ ฅ์ ๋ฐ๋ ๊ธฐ๋ฅ๋ง ์... |
@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, s... | Unknown | css ๋ฆฌ์
์๊ณ ์์๋๋ฐ ๋ฆฌ๋ง์ธ๋ํ๊ณ ๊ฐ๋๋ค! |
@@ -1,9 +1,10 @@
import { useState } from "react";
-import Input from "../components/Input";
import InputBox from "../components/InputBox";
-import validation from "../utils/validation";
+import InputCheckBox from "../components/InputCheckBox";
+import validateFormInfos from "../utils/validation";
import checking fr... | Unknown | ๋ณ์๋ช
๋ฐ๊พธ์ ๊ฑฐ ๊ตฟ๊ตฟ |
@@ -1,19 +1,28 @@
+import './InputBox.css';
+
type InputBoxProps = {
+ type: string;
id: string;
- checked: boolean;
- onChange: any;
+ value: string;
+ onChange: (e : React.FormEvent<HTMLInputElement>) => void;
+ label: string;
+ required: boolean;
}
-const InputBox = ({id, checked, onChange}: InputBoxPr... | Unknown | ์ปดํฌ๋ํธ ์ด๋ฆ์ด InputBox๋๊น checkbox์ฉ input ์์๋ฅผ ์ํ ์ปดํฌ๋ํธ ๊ฐ์๋ฐ, type props๋ฅผ ์ถ๊ฐํ๊ณ checked ์์ฑ ๋์ value ์์ฑ์ผ๋ก ๋ณ๊ฒฝํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -1,19 +1,28 @@
+import './InputBox.css';
+
type InputBoxProps = {
+ type: string;
id: string;
- checked: boolean;
- onChange: any;
+ value: string;
+ onChange: (e : React.FormEvent<HTMLInputElement>) => void;
+ label: string;
+ required: boolean;
}
-const InputBox = ({id, checked, onChange}: InputBoxPr... | Unknown | ์! ๋ฐ์ InputCheckBox๊ฐ ๋ฐ๋ก ์๊ณ ์๋์ Input์ด InputBox๋ก ๋ณ๊ฒฝ๋๊ฑฐ์๊ตฐ์. ์ ๋ ์์ ์ ๊ทธ๋๋ก Input๊ณผ InputCheckBox๊ฐ ๋ ๋์๋ณด์ฌ์..! |
@@ -1,9 +1,10 @@
import { useState } from "react";
-import Input from "../components/Input";
import InputBox from "../components/InputBox";
-import validation from "../utils/validation";
+import InputCheckBox from "../components/InputCheckBox";
+import validateFormInfos from "../utils/validation";
import checking fr... | Unknown | ์ ํํ ํ์
์ข์ต๋๋ค~! |
@@ -0,0 +1,28 @@
+import './InputCheckBox.css';
+
+type InputCheckBoxProps = {
+ id: string;
+ checked: boolean;
+ onChange: (e : React.FormEvent<HTMLInputElement>) => void;
+ label?: string;
+ required?: boolean;
+}
+
+const InputCheckBox = ({id, checked, onChange, label, required}: InputCheckBoxProps) => {
+ re... | Unknown | label์ className์ ๊ฒฐ์ ํ๋ ๋ถ๋ถ์ด inputBox์ inputCheckBox์์ ๋ฐ๋ณต๋ฉ๋๋ค. ์ด ๋ถ๋ถ์ ํ์ className๊ณผ ํ๋๊ทธ์ ๋ฐ๋ผ ์ถ๊ฐ์ฌ๋ถ๊ฐ ์ ํด์ง๋ className, ๊ทธ๋ฆฌ๊ณ ํ๋๊ทธ๋ฅผ ์ธ์๋ก ๋ฐ์์ ํด๋์ค ๋ค์์ ๋ฆฌํดํด์ฃผ๋ ํจ์๋ก ๋ฐ๊ฟ๋ณด๋ฉด ์ด๋จ๊น์?
```suggestion
const InputCheckBox = ({id, checked, onChange, label, required}: InputCheckBoxProps) => {
const labelClassName = getClassNameByRequired('inputC... |
@@ -0,0 +1,65 @@
+
+package basball.view;
+
+import basball.baseball.model.GameStatus;
+
+import java.util.Arrays;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+
+public final class InputView {
+
+ private static final String INPUT_NUMBER_MESSAGE = "์ซ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์ : ";
+ private static final Scanner s... | Java | (nit) Inner class๋ก ๋์ค๊ฑฐ๋ฉด Validator์ ๋ด๋ถ ๋ฉ์๋ ๋ชจ๋ private์ผ๋ก ํ๋๊ฒ ์ข๊ฒ ์ด์. |
@@ -0,0 +1,65 @@
+
+package basball.view;
+
+import basball.baseball.model.GameStatus;
+
+import java.util.Arrays;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+
+public final class InputView {
+
+ private static final String INPUT_NUMBER_MESSAGE = "์ซ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์ : ";
+ private static final Scanner s... | Java | ๋ฉํ ๋ ์๋
ํ์ธ์ ! ๋ต๋ณ ๋จ๊ฒจ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค ๊ทธ๋ฐ๋ฐ Validator ๋ฅผ private ๋ก ๋ฐ๊พธ๋ฉด Balls ๋ InputView ํ
์คํธ ๊ฐ์ ๊ณณ ์์๋ ์ด๋ป๊ฒ ์ฌ์ฉํด์ผ ํ๋์ ?
์ ์๊ฐ์ผ๋ก๋ InputView ์์ get ๋ฉ์๋๋ก ์ ๊ทผ ๋ฉ์๋๋ฅผ ์ ๊ณตํ๋ ๋ฐฉ๋ฒ ๋ฟ์ธ๋ฐ ์ด๋ ๊ฒ ๋๋ฉด InputView ํ
์คํธ๋ ๊ทธ๋ ๋ค ์ณ๋ Balls ๋ถ๋ถ์์ Validator ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด ๋ถํ์ํ๊ฒ InputView ๊ฐ์ฒด๋ฅผ ๋ง๋ค์ด์ผ ํ๋๋ฐ ๋ง์๊น์ !?
์๋๋ฉด ์ ๋ฒ์ ๋จ๊ฒจ์ฃผ์ static class ๋ก ๋ฐ๊พธ๋ผ๋๊ฒ ์ด๋ ๊ฒ ๋ฐ๊พธ๋ผ๊ณ ํ์ ๊ฒ ์๋์๋์ !?? |
@@ -0,0 +1,65 @@
+
+package basball.view;
+
+import basball.baseball.model.GameStatus;
+
+import java.util.Arrays;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+
+public final class InputView {
+
+ private static final String INPUT_NUMBER_MESSAGE = "์ซ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์ : ";
+ private static final Scanner s... | Java | ์ ์ ๋จ๊ฒจ๋๋ฆฐ๊ฑด static ๊ฐ๋ณ ํด๋์ค๋ก ๋๋ผ๋ ์๊ธฐ์์ด์ ใ
ใ
์ ๊ฐ private๋ก ํ๋ผ๊ณ ๋ง์๋๋ฆฐ๊ฑด ์ฌ์ค InputView ๋ด์์๋ง ์ฐ์ฌ์ ๊ทธ๋ ๊ฒ ๋ง์๋๋ฆฐ๊ฑฐ์์ด์. ๋ง์ฝ Validator ์์ฒด๊ฐ ๋ฐ์ผ๋ก ๋์์์ ์ด์ ๊ฐ ์๋ค๋ฉด ํ
์คํธ๋ ํ์์๋๊ฑฐ๊ฒ ์ฃ . (์บก์ํ์ ์๋ฏธ์์ด์. Validator๋ฅผ ๊ฐ์ ธ๋ค ์ธ ๋ฐ๊ฐ InputView ์ธ์ ์๋ค๋ฉด ๊ตณ์ด Validator๊ฐ ์ด๋ป๊ฒ ๊ตฌํ๋์๋์ง ํ
์คํธ๋ฅผ ์ด๋ป๊ฒ ํ ์ง๋ ๊ณ ๋ฏผํ ํ์๊ฐ ์๋๊ฑฐ๊ฒ ์ฃ )
ํ์ง๋ง Validator๊ฐ ๋ค๋ฅธ๋ฐ์๋ ์ฐ์ผ๊ฑฐ๋ผ๋ฉด ๊ฐ๋ณ static ํด๋์ค๋ก ๋นผ๋๋๊ฒ ๋ ์ข์ ๊ฒ ๊ฐ์์. |
@@ -0,0 +1,65 @@
+
+package basball.view;
+
+import basball.baseball.model.GameStatus;
+
+import java.util.Arrays;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+
+public final class InputView {
+
+ private static final String INPUT_NUMBER_MESSAGE = "์ซ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์ : ";
+ private static final Scanner s... | Java | ์๋
ํ์ธ์ ๋ฉํ ๋ ! `๊ฐ๋ณ static ํด๋์ค` ๋ผ๋ ๋ง์ด ์ ์ดํด๊ฐ ์๋๋๋ฐ ํน์ `Math` ํด๋์ค ์ฒ๋ผ `final ๊ณผ private ์์ฑ์` ๋ฅผ ํตํด ์์ฑ์ ๋ง๊ณ ๋จ์ง `Utils` ํด๋์ค ์ฒ๋ผ ์ฌ์ฉ ์ ์๋ฏธ ํ์๋๊ฑด๊ฐ์ ? ?์๋๋ฉด
์ธ๋ถ๋ `public ํด๋์ค` ๋ก ๋ง๋ค๊ณ ๋ด๋ถ์ `public static class` ๋ก ๋ง๋ค๋ผ๊ณ ํ์๋ ๊ฑด๊ฐ์ ??
< final ์ฌ์ฉ >
```
public final class Validator {
private Validator() {
}
private static... |
@@ -0,0 +1,65 @@
+
+package basball.view;
+
+import basball.baseball.model.GameStatus;
+
+import java.util.Arrays;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+
+public final class InputView {
+
+ private static final String INPUT_NUMBER_MESSAGE = "์ซ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์ : ";
+ private static final Scanner s... | Java | ์ ์..์ ๊ฐ ๋ง์๋๋ฆฐ๊ฑธ ๋๋ฌด ํฌ๊ฒ ์๊ฐํ์ ๊ฒ ๊ฐ๊ตฐ์..^^;
์ ๊ฐ ๋ง์๋๋ฆฐ๊ฑด ๋จ์ํ Validator.java ํ์ผ์ ํ๋ ๋ ๋ง๋ค์ด์ ๊ฑฐ๊ธฐ๋ค ๋ฃ๋๋ค๋ ์๊ธฐ์์ด์.
๊ทธ๋ฌ๋ฉด ๊ตณ์ด InputView์ ์ข
์์ ์ธ namespace๋ฅผ ๊ฐ์ง ํ์๊ฐ ์์ผ๋๊น์ ใ
ใ
|
@@ -88,5 +88,186 @@ export default {
display: flex;
align-items: center;
justify-content: center;
+ html,
+ body {
+ height: 100%;
+ width: 100%;
+ padding: 0;
+ margin: 0;
+ }
+ .container {
+ background: white;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: c... | Unknown | ์ฌ๊ธฐ์ด๋ ๊ฒํ๋ฉด์๋ผ์ |
@@ -88,5 +88,186 @@ export default {
display: flex;
align-items: center;
justify-content: center;
+ html,
+ body {
+ height: 100%;
+ width: 100%;
+ padding: 0;
+ margin: 0;
+ }
+ .container {
+ background: white;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: c... | Unknown | ์์ ํ์ต๋๋ค |
@@ -0,0 +1,141 @@
+package com.example.firstproject.controller;
+
+import com.example.firstproject.dto.ArticleDto;
+import com.example.firstproject.dto.BoardDto;
+import com.example.firstproject.entity.Article;
+import com.example.firstproject.entity.Board;
+import com.example.firstproject.service.ArticleService;
+impo... | Java | delete ๋ฉ์๋์ articleId๋ฅผ ์ฌ์ฉํ๋ ๋ฉ์๋์ ์์ ์ ๊ณ ๋ คํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์์ |
@@ -0,0 +1,41 @@
+package com.example.firstproject.controller;
+
+import com.example.firstproject.service.ArticleService;
+import com.example.firstproject.service.BoardService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.sp... | Java | / ์ฌ๋์์ ์ ๋ฌด์ ๋ฐ๋ฅธ ์ฐจ์ด์ ์ ํจ๊ป ๊ณต๋ถํด๋ด
์๋ค |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | AI Code Review:
๋ค์์ ๊ฐ ํญ๋ชฉ์ ๋ํด ๋ฌธ์ ์ ์ ์ง์ ํ๊ณ ๊ฐ์ ๋ฐฉ์์ ์ ์ํฉ๋๋ค.
**1. Pre-condition Check**
* `github_token` ๋ณ์์ ์ํ๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค. ํ์ฌ `os.environ['GITHUB_TOKEN']`๊ฐ None์ด๋ฉด ์์ธ๊ฐ ๋ฐ์ใใพใ. `github_token` ๋ณ์๋ ํ๊ฒฝ ๋ณ์๋ก ์ค์ ๋์ด์ผ ํ๋ฉฐ, None์ด๋ฉด ์ฝ๋ ์๋ํ์ง ์์ต๋๋ค.
* `repo` ๋ณ์์ ์ํ๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค. ํ์ฌ `os.environ['GITHUB_REPOSITORY']`๊ฐ None์ด๋ฉด ์์ธ๊ฐ ๋ฐ์ํฉ๋๋ค. `repo` ๋ณ์๋ ... |
@@ -0,0 +1,60 @@
+name: AI Code Review
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ code-review:
+ runs-on: ubuntu-latest
+ # runs-on: self-hosted
+
+ steps:
+ - uses: actions/checkout@v4
+
+ # - name: Set Python Pat... | Unknown | AI Code Review:
1. Pre-condition Check:
- ํจ์๋ ๋ฉ์๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๊ธฐ ์ํด ํ์ํ ๋ณ์์ ์ํ๋ ๊ฐ์ ๋ฒ์๋ฅผ ๊ฐ์ง๊ณ ์๋์ง ๊ฒ์ฌ
๋ฌธ์ ์ :
- ํ์ฌ ์ฝ๋๋ GITHUB_TOKEN์ ์ฌ์ฉํ์ฌ AI Code Review๋ฅผ ์ํํฉ๋๋ค. ํ์ง๋ง GITHUB_TOKEN์ secrets์ ๅญ๊ณ ์๋ secretes.GITHUB_TOKEN์ ๊ฐ์ด ์ฌ๋ฐ๋ฅธ์ง ํ์ธ๋์ง ์์ต๋๋ค.
- ๋ค๋ฅธ ๋ณ์๋ ๊ฐ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ค์ ๋์ด ์๋์ง ํ์ธ๋์ง ์์ต๋๋ค.
๊ฐ์ ๋ฐฉ์:
- GITHUB_TOKEN์ ๊ฐ์ด ์ฌ๋ฐ๋ฅธ์ง ํ์ธํ... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | AI Code Review:
1. Pre-condition Check:
๋ฌธ์ ์ : ์ฝ๋๋ ๋ณ์์ ์ํ๋ ๊ฐ์ ๋ฒ์๋ฅผ ๊ฒ์ฌํ์ง ์๊ณ directly ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
๊ฐ์ ๋ฐฉ์: ํจ์๋ ๋ฉ์๋์์ ํ์ํ ๋ณ์์ ์ํ๋ ๊ฐ์็ฏ์๋ฅผเธเธฃเธงเธเธชเธญเธํ๊ณ , ํ์ํ ๊ฒฝ์ฐ ์์ธ ์ฒ๋ฆฌ๋ rร ng์ ๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์๋ฅผ ๋ค์ด, ์ซ์๊ฐ negative๋ก ๋์ฌ ์ ์๋์ง ํ์ธํ๊ธฐ ์ํด `if` ๊ตฌ๋ฌธ๊ณผ `try-except` ๋ธ๋ก์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
```python
def example_function(num):
if num < 0:
r... |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## .github/scripts/ai_code_review.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions๋ฅผ ํตํด PR(ํ ใชใฏใจในใ)์ ๊ฒํ ํ๊ณ , ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ์คํฌ๋ฆฝํธ์
๋๋ค. ์ฃผ์ ๊ธฐ๋ฅ์ผ๋ก๋ PR ํ์ผ์ ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๊ณ , ์ค์ ํ์ผ์ ๋ํ ์์ธ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ฉฐ, ๋ผ์ธ ๋ณ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ๋ฑ์ด ์์ต๋๋ค.
### ์ข์ ์
* ์คํฌ๋ฆฝํธ๋ GitHub API๋ฅผ ์ฌ์ฉํ์ฌ PR ํ์ผ์ ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๊ณ , ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ๋ฑ ์๋ํ๋ ์ฝ๋ ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ๊ตฌํํ๊ณ ์์ต๋๋ค.
* ์ค์ ํ์ผ์ ๋ํ ์์ธ ๋ฆฌ... |
@@ -0,0 +1,60 @@
+name: AI Code Review
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ code-review:
+ runs-on: ubuntu-latest
+ # runs-on: self-hosted
+
+ steps:
+ - uses: actions/checkout@v4
+
+ # - name: Set Python Pat... | Unknown | ## .github/workflows/code-review.yml ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions ์ํฌํ๋ก์ฐ๋ฅผ ์ ์ํ๋ฉฐ, Pull Request ์ด๋ฒคํธ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์๋ํํฉ๋๋ค. ์ํฌํ๋ก์ฐ๋ Ubuntu ์ต์ ๋ฒ์ ์์ ์คํ๋๋ฉฐ, Python 3.x ํ๊ฒฝ์ ์ค์ ํ๊ณ , ์์กด์ฑ์ ์ค์นํ๊ณ , AI ์ฝ๋ ๋ฆฌ๋ทฐ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํฉ๋๋ค.
### ์ข์ ์
* ์ํฌํ๋ก์ฐ๋ Pull Request ์ด๋ฒคํธ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์๋ํํ์ฌ ๊ฐ๋ฐ ํ๋ก์ธ์ค๋ฅผ ํจ์จ์ ์ผ๋ก ๊ฐ์ ํฉ๋๋ค.
* Python 3.x ํ๊ฒฝ์ ์ค์ ํ๊ณ , ์์กด์ฑ์ ์ค์นํ์ฌ ์ฝ๋ ๋ฆฌ๋ทฐ ... |
@@ -25,3 +25,4 @@ flake8-comprehensions
flake8-pytest-style
isort
mypy
+groq
\ No newline at end of file | Unknown | ## app/backend/requirements.txt ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
app/backend/requirements.txt ํ์ผ์ Python ํ๋ก์ ํธ์ ๋ฐฑ์๋ ์ข
์์ฑ ๋ชฉ๋ก์ ์ ์ํฉ๋๋ค. ์ด ํ์ผ์๋ ํ๋ก์ ํธ์์ ์ฌ์ฉํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ด ํฌํจ๋์ด ์์ต๋๋ค.
### ์ข์ ์
- ํ๋ก์ ํธ์ ์ข
์์ฑ์ ๋ช
ํํ๊ฒ ์ ์ํ๊ณ ์์ต๋๋ค.
- ๊ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ ์ง์ ํ์ฌ ํ๋ก์ ํธ์ ์์ ์ฑ์ ๋ณด์ฅํฉ๋๋ค.
- ๋ค์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง๋ฅผ ์ฌ์ฉํ์ฌ ํ๋ก์ ํธ์ ๊ธฐ๋ฅ์ ํ์ฅํ๊ณ ์์ต๋๋ค.
### ๊ฐ์ ํ ์
- ์ผ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ด ๋ช
์... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ํ๋ก์ ํธ์ ์ค์ ์ ์ ์ํ๊ณ ๊ด๋ฆฌํ๋ ์ญํ ์ ํฉ๋๋ค. ํ๋ก์ ํธ์ ํ๊ฒฝ ๋ณ์๋ฅผ ๋ก๋ํ๊ณ , ์ค์ ํด๋์ค๋ฅผ ์ ์ํ์ฌ ์ค์ ๊ฐ์ ๊ด๋ฆฌํฉ๋๋ค.
### ์ข์ ์
* ํ๋ก์ ํธ์ ์ค์ ์ ๋ณ๋์ ํ์ผ๋ก ๋ถ๋ฆฌํ์ฌ ๊ด๋ฆฌํ๊ณ ์์ต๋๋ค. ์ด๋ ํ๋ก์ ํธ์ ์ฝ๋๋ฅผ ๊น๋ํ๊ฒ ์ ์งํ๊ณ , ์ค์ ๊ฐ์ ์ฝ๊ฒ ๊ด๋ฆฌํ ์ ์๋๋ก ํฉ๋๋ค.
* Pydantic์ ์ฌ์ฉํ์ฌ ์ค์ ํด๋์ค๋ฅผ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด๋ ์ค์ ๊ฐ์ ํ์
์ ๊ฐ์ ํ๊ณ , ์ ํจ์ฑ์ ๊ฒ์ฆํ์ฌ ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ ์ ์์ต๋๋ค.
* dotenv๋ฅผ... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ๋ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ๊ธฐ๋ฅ์ ๋ด๋นํฉ๋๋ค. ๋ค์ํ ์ ํ์ ๋ฆฌ๋ทฐ ํ๋กฌํํธ๋ฅผ ์ ์ํ๊ณ , ํ์ํ ๋ฐ์ดํฐ๋ฅผ ํฌํจํ์ฌ ํ๋กฌํํธ๋ฅผ ๋ฐํํ๋ ํจ์๋ค์ ์ ๊ณตํฉ๋๋ค.
### ์ข์ ์
- ์ฝ๋๋ ๊ฐ๋
์ฑ์ด ์ข๊ณ , ๊ฐ ํจ์์ ์ญํ ์ด ๋ช
ํํฉ๋๋ค.
- ํ๋กฌํํธ ํ
ํ๋ฆฟ์ string.format() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ๋์ ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ํฌํจํ ์ ์์ต๋๋ค.
- ํจ์๋ช
๊ณผ ๋ณ์๋ช
์ด ๋ช
ํํ๊ฒ ์ ์๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
- ํจ์์ ์ญํ ์ด ๋ช
ํํ์ง๋ง, ํจ์์ ์ค๋ช
๊ณผ ๋ํ๋จผํธ๊ฐ ์์ต๋๋ค.... |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## ์ ์ฒด ์ฝ๋ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ์คํฌ๋ฆฝํธ๋ GitHub PR ๋ฆฌ๋ทฐ๋ฅผ ์ํ ์ฝ๋ ๋ฆฌ๋ทฐ ์๋ํ ํด์
๋๋ค. ์ฃผ์ ๊ธฐ๋ฅ์ผ๋ก๋ PR์ ํฌํจ๋ ํ์ผ์ ์ค์๋๋ฅผ ํ๋จํ๊ณ , ์ค์ ํ์ผ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์์ฑํ์ฌ PR ์ฝ๋ฉํธ๋ก ๊ฒ์ํ๋ ๊ฒ์
๋๋ค.
### ์ข์ ์
1. PR ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ์๋ํํ์ฌ ๋ฆฌ๋ทฐ์ด์ ์
๋ฌด๋์ ์ค์ฌ ์ค๋๋ค.
2. ์ค์ ํ์ผ์ ํ๋จํ์ฌ ๋ฆฌ๋ทฐ์ ํจ์จ์ฑ์ ๋์
๋๋ค.
3. GitHub API๋ฅผ ์ฌ์ฉํ์ฌ PR ์ฝ๋ฉํธ๋ฅผ ์๋์ผ๋ก ์์ฑํ์ฌ ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ๊ฐ์ํํฉ๋๋ค.
### ๊ฐ์ ํ ์
1. ์ฝ๋์ ๊ฐ๋
์ฑ์ ๋์ด๊ธฐ ์ํด ํจ์ ๋ถ๋ฆฌ ๋ฐ ์ฃผ์ ์ถ๊ฐ๊ฐ ... |
@@ -0,0 +1,27 @@
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก
+IGNORED_FILES = [
+ '.gitignore',
+ 'requirements.txt',
+ 'docker-compose.yml',
+ 'Dockerfile',
+ 'setup.cfg',
+ 'pyproject.toml',
+ '.env.example',
+ 'README.md',
+ 'LICENSE',
+]
+
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ํ์ฅ์
+IGNORED_EXTENSIONS = [
+ '.md',
+ '.txt',
+ ... | Python | ## .github/scripts/review_config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub ๋ฆฌ๋ทฐ์ ๋ํ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์ฆ, ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก, ํ์ผ ํ์ฅ์, ์ค์ ํ์ผ ํ๋จ ๊ธฐ์ค ๋ฑ์ ์ ์ํฉ๋๋ค.
### ์ข์ ์
* ํ์ผ์ ๊ฐ๋
์ฑ ์๊ฒ ๊ตฌ์กฐํํ๊ณ ์์ต๋๋ค.
* ๋ณ์๋ช
์ด ๋ช
ํํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ์ฃผ์์ด ์ ์ ํ๊ฒ ์์ฑ๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* IGNORED_FILES ๋ชฉ๋ก์ด ๋๋ฌด ๊ธธ์ด ์ฝ๋ ๊ฐ๋
์ฑ์ ํด์นฉ๋๋ค. ์ด๋ฅผ ๊ฐ์ ํ์ฌ ๋ ๊ฐ๋
์ฑ ์๊ฒ ์์ฑํ ์ ์์ต๋๋ค.
* IMPORTANT_FILE_CHA... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ํ๋ก์ ํธ์ ์ค์ ์ ๊ด๋ฆฌํ๋ ์ญํ ์ ํฉ๋๋ค. ์ค์ ์ `.env` ํ์ผ์์ ์ฝ์ด๋ค์ฌ Pydantic์ `BaseSettings` ํด๋์ค๋ฅผ ํตํด ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๊ณ , ์ค์ ์ ์ ์ฅํ๋ ํด๋์ค `Settings`๋ฅผ ์ ์ํฉ๋๋ค.
### ์ข์ ์
* `.env` ํ์ผ์ ์ฌ์ฉํ์ฌ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐฉ์์ ์ผ๋ฐ์ ์ด๊ณ ํธ๋ฆฌํฉ๋๋ค.
* Pydantic์ `BaseSettings` ํด๋์ค๋ฅผ ์ฌ์ฉํ์ฌ ์ค์ ์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๋ ๋ฐฉ์์ ์์ ํ๊ณ ๊ฐ๋ ฅํฉ๋๋ค.
* ์ค์ ์ ์ ์ฅํ๋... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ๋ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ํจ์๋ค์ ์ ์ํฉ๋๋ค. ํ๋กฌํํธ๋ ์ ์ฒด ์ฝ๋ ๋ฆฌ๋ทฐ, ํ์ผ ๋ฆฌ๋ทฐ, ๋ผ์ธ๋ณ ์ฝ๋ฉํธ, ์ ์ฒด ๋ฆฌ๋ทฐ ์์ฝ์ ์ํ ํ
ํ๋ฆฟ์ ์ ๊ณตํฉ๋๋ค.
### ์ข์ ์
* ํจ์๋ช
์ด ๋ช
ํํ๊ณ ์ง๊ด์ ์
๋๋ค.
* ํ๋กฌํํธ ํ
ํ๋ฆฟ์ด ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
* ํจ์๊ฐ ๋
๋ฆฝ์ ์ด๋ฉฐ ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํฉ๋๋ค.
### ๊ฐ์ ํ ์
* ํจ์์ ๋ํ ๋ฌธ์ํ๊ฐ ๋ถ์กฑํฉ๋๋ค. ํจ์์ ์ค๋ช
๊ณผ ํ๋ผ๋ฏธํฐ์ ๋ํ ์ ๋ณด๊ฐ ํ์ํฉ๋๋ค.
* ํ๋กฌํํธ ํ
ํ๋ฆฟ์ ๋ํ ์ค๋ช
์ด ํ์ํฉ๋๋ค. ์๋ฅผ ๋ค์ด, `{code}`,... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. REVIEW_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | FILE_REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. FILE_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | LINE_COMMENTS_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. LINE_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_review_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_file_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_file_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_line_comments_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_line_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_total_comments_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_total_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## .github/scripts/ai_code_review.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions์ ์ผ๋ถ๋ก ๋์ํ๋ ํ์ด์ฌ ์คํฌ๋ฆฝํธ์
๋๋ค. ์ด ์คํฌ๋ฆฝํธ๋ PR(ํ ๋ฆฌํ์คํธ)์์ ๋ณ๊ฒฝ๋ ํ์ผ์ ๊ฐ์ ธ์์, ๊ฐ ํ์ผ์ ์ค์๋๋ฅผ ํ๊ฐํ ํ ์ค์ ํ์ผ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํฉ๋๋ค. ์ฝ๋ ๋ฆฌ๋ทฐ๋ Groq API๋ฅผ ์ฌ์ฉํ์ฌ ์๋์ผ๋ก ์ํ๋๋ฉฐ, ๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ๋ PR์ ์ฝ๋ฉํธ๋ก ๊ฒ์๋ฉ๋๋ค.
### ์ข์ ์
* ์ด ์คํฌ๋ฆฝํธ๋ PR์์ ๋ณ๊ฒฝ๋ ํ์ผ์ ์๋์ผ๋ก ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค. ์ด๊ฒ์ ๊ฐ๋ฐ์๋ค์ด ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ ๋ฐ ... |
@@ -0,0 +1,27 @@
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก
+IGNORED_FILES = [
+ '.gitignore',
+ 'requirements.txt',
+ 'docker-compose.yml',
+ 'Dockerfile',
+ 'setup.cfg',
+ 'pyproject.toml',
+ '.env.example',
+ 'README.md',
+ 'LICENSE',
+]
+
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ํ์ฅ์
+IGNORED_EXTENSIONS = [
+ '.md',
+ '.txt',
+ ... | Python | ## .github/scripts/review_config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ Git ๋ฆฌ๋ทฐ์ ๊ด๋ จ๋ ์ค์ ์ ์ ์ํฉ๋๋ค. ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก, ํ์ผ ํ์ฅ์, ์ค์ ํ์ผ ํ๋จ ๊ธฐ์ค, ํ์ผ๋น ์ต๋ ์ฝ๋ฉํธ ์ ๋ฑ์ ์ค์ ํฉ๋๋ค.
### ์ข์ ์
* ํ์ผ์ด ๊ฐ๋จํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ๋ณ์๋ช
์ด ๋ช
ํํ๊ณ ์ผ๊ด์ ์
๋๋ค.
* ์ฃผ์ ์ค์ ํญ๋ชฉ์ด ์ ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* ํ์ผ์ ๋ํ ์ค๋ช
์ด ์์ต๋๋ค. ํ์ผ์ ๋ชฉ์ ๊ณผ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ํ ์ฃผ์์ ์ถ๊ฐํ ํ์๊ฐ ์์ต๋๋ค.
* ๋ณ์์ ์๋ฏธ์ ์ฌ์ฉ ์์๊ฐ ์์ต๋๋ค. ๊ฐ ๋ณ์์ ๋ํ ์ฃผ์์... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ๋ฐฑ์๋ ์ ํ๋ฆฌ์ผ์ด์
์ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์ค์ ์ ํ๊ฒฝ ๋ณ์์์ ๋ก๋๋๋ฉฐ, ์ค์ ํญ๋ชฉ์ `Settings` ํด๋์ค์ ์ ์๋์ด ์์ต๋๋ค.
### ์ข์ ์
* ์ด ํ์ผ์ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋๋ `Settings` ํด๋์ค๋ฅผ ์ ๊ณตํ๋ฉฐ, ํ๊ฒฝ ๋ณ์์์ ์ค์ ๊ฐ์ ๋ก๋ํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
* ์ค์ ํญ๋ชฉ์ ๋ช
ํํ๊ฒ ์ ์๋์ด ์์ผ๋ฉฐ, ์ค์ ํญ๋ชฉ์ ํ์
์ด ๋ช
ํํ๊ฒ ์ง์ ๋์ด ์์ต๋๋ค.
* `parse_cors` ํจ์๋ฅผ ์ฌ์ฉํ์ฌ CORS ์ค์ ๊ฐ์ ํ์ฑํ๋... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ํจ์๋ค์ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ์ฌ์ฉ๋ ํ๋กฌํํธ๋ฅผ ์์ฑํ์ฌ ๋ฐํํ๋ ์ญํ ์ ํฉ๋๋ค.
### ์ข์ ์
* ์ฝ๋๊ฐ ๊ฐ๊ฒฐํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ํจ์๋ช
์ด ๋ช
ํํ๊ณ , ํจ์์ ์ญํ ์ด ๋ถ๋ช
ํฉ๋๋ค.
* ํ๋กฌํํธ์ ํ์์ ์ ์ํ์ฌ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* ํจ์์ ๊ฐ ๋งค๊ฐ๋ณ์์ ๋ํ ์ค๋ช
์ด ์์ต๋๋ค.
* ํ๋กฌํํธ์ ํ์์ด ๋ณ๊ฒฝ๋ ๊ฒฝ์ฐ, ๋ชจ๋ ํจ์์์ ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค.
* ์๋ฌ ํธ๋ค๋ง์ด ์์ต๋๋ค. ์๋ฅผ ๋ค์ด... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | FILE_REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,105 @@
+import { Helmet } from 'react-helmet-async';
+import titles from '../routes/titles';
+import styled from 'styled-components';
+import MainCard from './components/MainCard';
+import Tag from './components/Tag';
+import Card from './components/Card';
+import { useQuery } from 'react-query';
+import { g... | Unknown | P4: margin์ด๋ margin-bottom ๊ฐ์ด ์ด ์ด์ ๊ฐ ์์๊น์? ํ๋๋ก ํต์ผํ๋ฉด ๋ ๊ฒ ๊ฐ์์. |
@@ -0,0 +1,105 @@
+import { Helmet } from 'react-helmet-async';
+import titles from '../routes/titles';
+import styled from 'styled-components';
+import MainCard from './components/MainCard';
+import Tag from './components/Tag';
+import Card from './components/Card';
+import { useQuery } from 'react-query';
+import { g... | Unknown | P1: suspense๋ก ์ฎ๊ธฐ๋ ๊ฒ ๊ณต๋ถ
https://blog.jbee.io/react/React%EC%97%90%EC%84%9C+%EC%84%A0%EC%96%B8%EC%A0%81%EC%9C%BC%EB%A1%9C+%EB%B9%84%EB%8F%99%EA%B8%B0+%EB%8B%A4%EB%A3%A8%EA%B8%B0 |
@@ -0,0 +1,32 @@
+import styled from 'styled-components';
+
+const TagWrapper = styled.div<{ $isActive: boolean }>`
+ border-radius: 40px;
+ border: none;
+ padding: 14px 20px;
+ font-size: 18px;
+ cursor: pointer;
+ line-height: 22px;
+ color: ${(props) => (props.$isActive ? '#ffffff' : '#868b94')};
+ backgrou... | Unknown | P3: ์ดํ์ css variables๋ก ๋นผ์ ๊ด๋ฆฌํ๋ฉด ์ข์ ๊ฒ ๊ฐ์์. |
@@ -0,0 +1,31 @@
+class VisitDateError {
+ #notInputDate(visitDate) {
+ if (visitDate.length === 0) {
+ throw new Error('[ERROR] ๋ฐฉ๋ฌธ ๋ ์ง๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์.');
+ }
+ }
+
+ #dateNotNum(visitDate) {
+ if (
+ Number.isNaN(Number(visitDate)) ||
+ Number.isInteger(Number(visitDate)) === false ||
+ visitD... | JavaScript | ํด๋น ๋ถ๋ถ ์ ๊ท ํํ์์ผ๋ก ํ๋ฉด if๋ฌธ์ ํ๋๋ก ์ค์ผ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค ! |
@@ -0,0 +1,31 @@
+class VisitDateError {
+ #notInputDate(visitDate) {
+ if (visitDate.length === 0) {
+ throw new Error('[ERROR] ๋ฐฉ๋ฌธ ๋ ์ง๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์.');
+ }
+ }
+
+ #dateNotNum(visitDate) {
+ if (
+ Number.isNaN(Number(visitDate)) ||
+ Number.isInteger(Number(visitDate)) === false ||
+ visitD... | JavaScript | ํด๋น ๋ฌธ๊ตฌ๋ constant์ ๋ฐ๋ก error.js๋ฅผ ์์ฑํ์
์ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค ! |
@@ -0,0 +1,61 @@
+import { MENU_NAMES, MENUS } from '../../constant/menu.js';
+
+class OrderMenuError {
+ #orderNotInput(orderMenu) {
+ if (
+ orderMenu.length === 1 &&
+ orderMenu[0].menu.trim() === ''
+ ) {
+ throw new Error('[ERROR] ์ฃผ๋ฌธํ์ค ๋ฉ๋ด์ ๊ฐ์๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์.');
+ }
+ }
+
+ #orderWrongInput(ord... | JavaScript | ์ ๋ ์ค์๋ก ๋์น ๋ถ๋ถ์ด์ง๋ง 1.0์ ํฌํจํ ์ง ์ํ ์ง ๊ณ ๋ฏผํ์
จ๋ค๊ณ ํ์
จ๋๋ฐ ๊ทธ ๋ถ๋ถ ์ดํดํฉ๋๋ค...
๋ฏธ์
์ด ๋๋๊ณ ์๊ฐ๋๊ฑฐ์ง๋ง 1.0๋ ํฌํจ์ ํ๋ค๋ฉด 1.000000000000000... ๋ 1๋ก ๋๋๊ฑฐ๋ผ 0์ ๋ฌดํ๋๋ก ์
๋ ฅํ๋ฉด ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ง ์์๊น ํ๋ ์ฐ๋ ค๊ฐ ๋๋๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -0,0 +1,28 @@
+const EVENT_NAMES = ['ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ', 'ํ์ผ ํ ์ธ', '์ฃผ๋ง ํ ์ธ', 'ํน๋ณ ํ ์ธ', '์ฆ์ ์ด๋ฒคํธ'];
+
+const WEEKDAY_DISCOUNT_DATE = [
+ 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17,
+ 18, 19, 20, 21, 24, 25, 26, 27, 28, 31,
+];
+
+const WEEKEND_DISCOUNT_DATE = [
+ 1, 2, 8, 9, 15, 16, 22, 23, 29, 30,
+];
+
+const SPECIAL_DISCOUNT... | JavaScript | ํด๋น ๋ถ๋ถ์ `new Date()` ๋ฉ์๋๋ก ํํ์ด ๊ฐ๋ฅํ ๊ฒ ๊ฐ์ต๋๋ค !
`new Date()`๋ฅผ ์ฌ์ฉํ์๋ฉด 0-์ผ์์ผ ~ 6-ํ ์์ผ๋ก 0~6๊น์ง์ number๋ก ์ถ๋ ฅ๋ฉ๋๋ค ! |
@@ -0,0 +1,66 @@
+import OUTPUT from '../../utils/constant/output.js';
+import OutputView from '../../utils/view_type/OutputView.js';
+import { EVENT_NAMES } from '../../utils/constant/event.js';
+
+class PrintEventResult {
+ #totalOrderAmount(TOTAL_AMOUNT) {
+ OutputView.printOutput(`${OUTPUT.TOTAL_AMOUNT.BEFORE_D... | JavaScript | ```jsx
OutputView.printOutput('');
```
์ด ๋ฌธ๊ตฌ ๊ฐํ๋๋ฌธ์ ์
๋ ฅํ์ ๊ฒ ๊ฐ์๋ฐ `์`๋ ๋ณ์ํ ํ์
์ `์\n`์ ํ์
๋ ๋๊ณ
๊ทธ ๋ค์ ๋ฌธ๊ตฌ์ `OutputView.printOutput(${OUTPUT.EVENT.BADGE});`๊ฐ ๋์ค๋
`BADGE: '\n<12์ ์ด๋ฒคํธ ๋ฐฐ์ง>'` ์ด๋ฐ์์ผ๋ก ์ถ๊ฐํ๋ฉด ์ฝ๋๊ฐ ์กฐ๊ธ ๋ ๊น๋ํด ์ง ๊ฒ ๊ฐ์์ ! |
@@ -0,0 +1,56 @@
+import { WEEKDAY_DISCOUNT_DATE, WEEKEND_DISCOUNT_DATE, SPECIAL_DISCOUNT_DATE } from '../../utils/constant/event.js';
+import { MENUS } from '../../utils/constant/menu.js';
+
+class CalculateEventBenefit {
+ #event = {
+ christmas: 0,
+ weekday: 0,
+ weekend: 0,
+ special: 0,
+ giveaway... | JavaScript | ```jsx
#event = {
christmas: 0,
weekday: 0,
weekend: 0,
special: 0,
giveaway: 0,
};
```
์ด๋ ๊ฒ ์์ฑํ์ ๊ฒ ์ฒ๋ผ ํด๋น ์์ ๊ฐ๋ ๊ณ ์ ๊ฐ์ด๋ ๋ณ์ํํด์ ์๋ฏธ๋ฅผ ๋ถ์ฌํ๋ ๊ฒ๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค ! |
@@ -0,0 +1,41 @@
+import VisitDateError from '../../../utils/error/type/visit_date_error.js';
+import printError from '../../../utils/error/print_error.js';
+import INPUT_QUESTION from '../../../utils/constant/input_question.js';
+import OUTPUT from '../../../utils/constant/output.js';
+import InputView from '../../../... | JavaScript | ์๊ตฌ์ฌํญ์ ์๋ ๋ง์ฝ ํ์์ ๋ง์ง ์์ผ๋ฉด ์๋ก์ด ๊ฐ์ ๋ฐ์์ค๋ ๊ณผ์ ์ด ์๋๊ฒ ๊ฐ์ต๋๋ค.
(ํน์ ์ ๊ฐ ๋ชป ์ฐพ๋ ๊ฒ์ด๋ผ๋ฉด ์ ์ํด์ฃผ์๊ธฐ ๋ฐ๋๋๋ค)
ํด๋น ๊ตฌ๋ฌธ์์๋ return false๋ฅผ ํ๊ณ ๊ทธ๋ฅ break์จ์ ๋น ์ ธ ๋์จ๊ฒ ๊ฐ์๋ฐ return false ๋์ return this.#inputVisitDate() ํ๋ฉด ๋ค์ ๊ฐ์ ๋ฐ์ ์ฌ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,48 @@
+import CalculateOrderMenu from '../../model/calculate_order_menu.js';
+import PrintOrderMenu from '../../view/print_order_menu.js';
+import OrderMenuError from '../../../utils/error/type/order_menu_error.js';
+import printError from '../../../utils/error/print_error.js';
+import INPUT_QUESTION from '.... | JavaScript | ์ด ๋ถ๋ถ๋ ๋ ์ง ๋ฐ์์ฌ๋์ ๋ง์ฐฌ๊ฐ์ง๋ก ์๋ชป๋ ๊ฒฝ์ฐ ์ ๊ฐ์ ๊ฐ์ ธ์ค๋ ๊ณผ์ ์ด ์์ด๋ณด์
๋๋ค |
@@ -0,0 +1,67 @@
+import CalculateTotalOrderAmount from '../../model/calculate_total_order_amount.js';
+import CalculateEventDetails from '../../model/calculate_event_details.js';
+import PrintEventResult from '../../view/print_event_result.js';
+
+class EventManage {
+ #visitDate;
+ #orderMenu;
+
+ constructor(visi... | JavaScript | ์ด ๋ถ๋ถ์์ 10000์ด ์ด๋ค ์๋ฏธ๋ฅผ ๊ฐ๊ณ ์๋์ง ํ๋จํ๊ธฐ ํ๋ญ๋๋ค. ์ด ํ๋ก๋ ์ซ์๊ฐ ํ๋์ฝ๋ฉ ๋ ๊ฒฝ์ฐ๊ฐ ์๋๋ฐ ์๋ฏธ๋ฅผ ๊ฐ์ง ์ ์๋๋ก ์์์ชฝ์ผ๋ก ๋นผ์ฃผ๋ ๊ฒ์ ์ด๋จ๊น์? |
@@ -0,0 +1,67 @@
+import CalculateTotalOrderAmount from '../../model/calculate_total_order_amount.js';
+import CalculateEventDetails from '../../model/calculate_event_details.js';
+import PrintEventResult from '../../view/print_event_result.js';
+
+class EventManage {
+ #visitDate;
+ #orderMenu;
+
+ constructor(visi... | JavaScript | else๋ฅผ ์ง์ํ๋ผ๊ณ ํ ๊ฒ์ ์๋ฏธ๊ฐ ๊ฑฐ์ ๋น์ทํ ์๋ฏธ๋ฅผ ๊ฐ๊ณ ์๋ ์ผํญ ์ฐ์ฐ์๋ฅผ ์ฐ๋ผ๊ณ ํ ๊ฒ์ ์๋๋ผ๊ณ ์๊ฐํ๋๋ฐ, ์ผํญ ์ฐ์ฐ์๋ฅผ ์ด ์ด์ ๊ฐ ๋ฐ๋ก ์์๊น์? |
@@ -0,0 +1,67 @@
+import CalculateTotalOrderAmount from '../../model/calculate_total_order_amount.js';
+import CalculateEventDetails from '../../model/calculate_event_details.js';
+import PrintEventResult from '../../view/print_event_result.js';
+
+class EventManage {
+ #visitDate;
+ #orderMenu;
+
+ constructor(visi... | JavaScript | ์
๋ ฅ 2๊ฐ์ ์ด๋ฒคํธ๋ก ํด๋์ค๋ฅผ ๋๋์
จ๋๋ฐ ๋ฐฐ์ง๋ ๋๋จธ์ง ์ชฝ(ํ ์ธ์ด๋ ํํ ๋ฑ ๊ณ์ฐํํธ)์ ๊ธฐ๋ฅ์ด ๋ฌ๋ผ๋ณด์ด๋๋ฐ ๋ค๋ฅธ ํด๋์ค๋ก ๋นผ๋๊ฒ์ ์ด๋จ๊น์ |
@@ -0,0 +1,41 @@
+import VisitDateError from '../../../utils/error/type/visit_date_error.js';
+import printError from '../../../utils/error/print_error.js';
+import INPUT_QUESTION from '../../../utils/constant/input_question.js';
+import OUTPUT from '../../../utils/constant/output.js';
+import InputView from '../../../... | JavaScript | 3์ฃผ์ฐจ ๊ณตํต ํผ๋๋ฐฑ์ "๊ฐ์ฒด๋ก๋ถํฐ ๋ฐ์ดํฐ๋ฅผ ๊บผ๋ด๋ ๊ฒ(get)์ด ์๋๋ผ, ๋ฉ์์ง๋ฅผ ๋์ง๋๋ก ๊ตฌ์กฐ๋ฅผ ๋ฐ๊ฟ ๋ฐ์ดํฐ๋ฅผ ๊ฐ์ง๋ ๊ฐ์ฒด๊ฐ ์ผํ๋๋ก ํด์ผํ๋ค"๊ณ ํ๋๋ฐ, getter๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ํด๊ฒฐํ ๋ฐฉ๋ฒ์ ๊ณ ๋ฏผํด๋ณด๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,41 @@
+import VisitDateError from '../../../utils/error/type/visit_date_error.js';
+import printError from '../../../utils/error/print_error.js';
+import INPUT_QUESTION from '../../../utils/constant/input_question.js';
+import OUTPUT from '../../../utils/constant/output.js';
+import InputView from '../../../... | JavaScript | ๋ณ์๋ช
์ `ERROR`๋ก ํ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค. |
@@ -0,0 +1,41 @@
+import VisitDateError from '../../../utils/error/type/visit_date_error.js';
+import printError from '../../../utils/error/print_error.js';
+import INPUT_QUESTION from '../../../utils/constant/input_question.js';
+import OUTPUT from '../../../utils/constant/output.js';
+import InputView from '../../../... | JavaScript | (์ง๋๊ฐ๋ค) ์์ธ๊ฐ ๋ฐ์ํ์ฌ `return false`๋ฅผ ํ๋ฉด `#inputVisitDate()` ๋ฉ์๋์์ ์กฐ๊ฑด์์ ๊ฑธ๋ฆฌ์ง ์์ ๊ฒ์ด๊ณ , ๋ฌดํ ๋ฃจํ์ ์ํด ์ฌ์
๋ ฅ์ ๋ฐ๊ฒ๋ ๊ฒ ๊ฐ๋ค์!
๋ฌดํ ๋ฃจํ๊ฐ ์๋ ๋ค๋ฅธ ๋ฐฉ์์ ํด๊ฒฐ๋ฐฉ๋ฒ๋ ๊ณ ๋ฏผํด๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,29 @@
+import VisitDateManage from '../child/visit_date_manage.js';
+import OrderMenuManage from '../child/order_menu_manage.js';
+import EventManage from '../child/event_manage.js';
+
+class PlannerManage {
+ #VISIT_DATE = null;
+ #ORDER_MENU = null;
+
+ async visitDate() {
+ const visitDateManage = n... | JavaScript | 3์ฃผ์ฐจ ๊ณตํต ํผ๋๋ฐฑ์ ํ๋์ ์๋ฅผ ์ต์ํํ๋ค๋ ์ฝ๋ฉํธ๊ฐ ์๋๋ฐ, ํ๋๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ์ธ์๋ก ์ ํด์ฃผ์ด ์ฌ์ฉํ๋ค๋ฉด ์ด๋ ์๊น์? |
@@ -0,0 +1,29 @@
+import VisitDateManage from '../child/visit_date_manage.js';
+import OrderMenuManage from '../child/order_menu_manage.js';
+import EventManage from '../child/event_manage.js';
+
+class PlannerManage {
+ #VISIT_DATE = null;
+ #ORDER_MENU = null;
+
+ async visitDate() {
+ const visitDateManage = n... | JavaScript | ๋๋ฉ์ธ ๋ก์ง๊ณผ UI ๋ก์ง์ด ๋ถ๋ฆฌ๋์ด ์์ง์์ ์ฑ ๋ก์ง์ด ์ ๊ฐ๋๋ค ๋ณด๋ ํฐ ํ๋ฆ์ ํ์
ํ๊ธฐ ์ด๋ ค์๋ณด์
๋๋ค.
PlannerManage์์๋ ํ์ด์ฆ๋ฅผ ๋๋๊ณ ๋ค์ด๋ฐ์ ํตํด ํฐ ํ๋ก์ธ์ค๋ฅผ ํํํ๊ณ , ๋ด๋ถ ๋์์ ๋๋ฉ์ธ, UI ๋ก์ง์ ๋ถ๋ฆฌํ์ฌ ๋ด๋นํ๋๋ก ํ๋ฉด ๋์ฑ ์๋ฏธ๊ฐ ๋๋ฌ๋๊ณ ํ๋ก์ธ์ค๋ฅผ ์ดํดํ๊ธฐ ์์ํ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,67 @@
+import CalculateTotalOrderAmount from '../../model/calculate_total_order_amount.js';
+import CalculateEventDetails from '../../model/calculate_event_details.js';
+import PrintEventResult from '../../view/print_event_result.js';
+
+class EventManage {
+ #visitDate;
+ #orderMenu;
+
+ constructor(visi... | JavaScript | 10,000๋ ์์๋ก ๊ด๋ฆฌํด์ฃผ๋ฉด ๋์ฑ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. ์๋ฏธ๋ฅผ ํ์
ํ๊ธฐ๋ ์์ํ๊ณ , ๋ง์ฝ ์กฐ๊ฑด์ด ๋ณ๊ฒฝ๋๋ ์ํฉ์ด ์๋ ๊ฒฝ์ฐ ์์ ํ๊ธฐ ์์ํ๋ค๊ณ ์๊ฐํฉ๋๋ค. |
@@ -0,0 +1,67 @@
+import CalculateTotalOrderAmount from '../../model/calculate_total_order_amount.js';
+import CalculateEventDetails from '../../model/calculate_event_details.js';
+import PrintEventResult from '../../view/print_event_result.js';
+
+class EventManage {
+ #visitDate;
+ #orderMenu;
+
+ constructor(visi... | JavaScript | ์ฌ์ํ์ง๋ง, ์กฐ๊ฑด์ ์ญ์์ผ๋ก ์ ์๋ค๋ฉด ๋ ์ดํดํ๊ธฐ ์์ํ ๊ฒ ๊ฐ์ต๋๋ค.
`20000 ์ด์: ์ฐํ / 10000 ์ด์: ํธ๋ฆฌ / 5000 ์ด์: ๋ณ / ๋๋จธ์ง: ์์` |
@@ -0,0 +1,28 @@
+const EVENT_NAMES = ['ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ', 'ํ์ผ ํ ์ธ', '์ฃผ๋ง ํ ์ธ', 'ํน๋ณ ํ ์ธ', '์ฆ์ ์ด๋ฒคํธ'];
+
+const WEEKDAY_DISCOUNT_DATE = [
+ 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17,
+ 18, 19, 20, 21, 24, 25, 26, 27, 28, 31,
+];
+
+const WEEKEND_DISCOUNT_DATE = [
+ 1, 2, 8, 9, 15, 16, 22, 23, 29, 30,
+];
+
+const SPECIAL_DISCOUNT... | JavaScript | ์ฌ๋ฌ ๊ฐ์ ์ธ์๋ฅผ ๋๊ฒจ์ฃผ๊ณ freeze ๋ฉ์๋๋ฅผ ํธ์ถํ๋ฉด ํ๋ฆฌ์ง๋์ง ์์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,33 @@
+const MENU_NAMES = [
+ '์์ก์ด์ํ', 'ํํ์ค', '์์ ์๋ฌ๋',
+ 'ํฐ๋ณธ์คํ
์ดํฌ', '๋ฐ๋นํ๋ฆฝ', 'ํด์ฐ๋ฌผํ์คํ', 'ํฌ๋ฆฌ์ค๋ง์คํ์คํ',
+ '์ด์ฝ์ผ์ดํฌ', '์์ด์คํฌ๋ฆผ',
+ '์ ๋ก์ฝ๋ผ', '๋ ๋์์ธ', '์ดํ์ธ',
+];
+
+const MENUS = {
+ Epitizer: {
+ ์์ก์ด์ํ: 6000,
+ ํํ์ค: 5500,
+ ์์ ์๋ฌ๋: 8000,
+ },
+ Main: {
+ ํฐ๋ณธ์คํ
์ดํฌ: 55000,
+ ๋ฐ๋นํ๋ฆฝ: 54000,
+ ํด์ฐ๋ฌผํ์คํ: 35000... | JavaScript | ์ค์ฒฉ๋ ๊ฐ์ฒด์ ๊ฒฝ์ฐ, ์ธ๋ถ๋ฅผ ํ๋ฆฌ์ง ํด์ฃผ์ด๋ ๋ด๋ถ๋ ํ๋ฆฌ์ง ๋์ง ์์ต๋๋ค. deep freeze ํค์๋๋ก ํ์ตํด๋ณด๋ ๊ฒ์ ์ถ์ฒ๋๋ฆฝ๋๋ค. |
@@ -0,0 +1,31 @@
+package dto;
+
+import domain.car.Car;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static util.Splitter.BLANK;
+
+public class CarDto {
+ private String name;
+ private List<String> whiteSpaceList;
+
+ public CarDto(Car car) {
+... | Java | carDto์ position์ ์์ฑ์์์ whiteSpaceList ๋ง๋๋ ๊ฑธ ์ ์ธํ๊ณค ์ฐ๋๋ฐ๊ฐ ์๋ ๊ฒ ๊ฐ์๋ฐ, carDto์์ ๋นผ๋ ๊ฑด ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -1,79 +1,83 @@
<!DOCTYPE html>
<html>
+
<head>
-<meta charset="UTF-8">
-<title>๋ ์ด์ค!</title>
+ <meta charset="UTF-8">
+ <title>๋ ์ด์ค!</title>
-<!-- Latest compiled and minified CSS -->
-<link rel="stylesheet"
- href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
- integrity="sha384-B... | Unknown | ์ด ๋ถ๋ถ์ ์ด๋ป๊ฒ ํ ๊น ๊ณ ๋ฏผํ๋ค๊ฐ..๊ทธ๋ฅ ๋ฌธ๊ตฌ๋ฅผ ์์ ํ๋๋ฐ, ์ด ๋ถ๊ธฐ๋ฌธ ๋ฃ๋ ๊ฒ๋ ์๊ฐํด๋ด์ผ๊ฒ ๋ค์๐ |
@@ -0,0 +1,79 @@
+package view;
+
+import domain.car.Car;
+import domain.game.RacingGame;
+import domain.game.Track;
+import domain.random.RandomGenerator;
+import domain.strategy.RandomMovingStrategy;
+import dto.CarDto;
+import dto.RacingGameRequestDto;
+import spark.Route;
+import util.Splitter;
+
+import java.util.... | Java | ๊ฒ์์์์ ํ์ํ input๊ณผ ๊ฒฐ๊ณผ๊ฐ์ธ result๋ฅผ ๊ฐ์ ธ์ค๋ ๋ก์ง์ ๋ฉ์๋๋ก ๋ถ๋ฆฌํ๋ฉด ๋ ๊น๋ํด ์ง๊ฑฐ ๊ฐ์์ |
@@ -0,0 +1,79 @@
+package view;
+
+import domain.car.Car;
+import domain.game.RacingGame;
+import domain.game.Track;
+import domain.random.RandomGenerator;
+import domain.strategy.RandomMovingStrategy;
+import dto.CarDto;
+import dto.RacingGameRequestDto;
+import spark.Route;
+import util.Splitter;
+
+import java.util.... | Java | ๋ฉ์๋๋ฅผ ๋ถํดํด๋ ์ข์๊ฒ ๊ฐ์ต๋๋ค ๐ ! |
@@ -0,0 +1,25 @@
+import view.WebRacingHandler;
+
+import java.util.HashMap;
+
+import static spark.Spark.*;
+import static util.RenderUtil.render;
+
+public class WebMain {
+ public static final int PORT = 8080;
+ private static WebRacingHandler webRacingHandler = new WebRacingHandler();
+
+ public static voi... | Java | ํ, ๋ณ๊ฑด์๋๋ฐ `post`๊ฐ ์๊ตฌ์ฌํญ์ด์์ต๋๋ค ๐ |
@@ -0,0 +1,79 @@
+package view;
+
+import domain.car.Car;
+import domain.game.RacingGame;
+import domain.game.Track;
+import domain.random.RandomGenerator;
+import domain.strategy.RandomMovingStrategy;
+import dto.CarDto;
+import dto.RacingGameRequestDto;
+import spark.Route;
+import util.Splitter;
+
+import java.util.... | Java | ์๊ฑด ๋ฐํ๊ฐ์ด ๋ฐ๋ก ์๋์ด์ ๊ฐ ์์๊น์ ?
`getTracks()`๋ ๋ฉ์๋๊ฐ ๋ฐ๋ก์์ด์์! |
@@ -0,0 +1,79 @@
+package view;
+
+import domain.car.Car;
+import domain.game.RacingGame;
+import domain.game.Track;
+import domain.random.RandomGenerator;
+import domain.strategy.RandomMovingStrategy;
+import dto.CarDto;
+import dto.RacingGameRequestDto;
+import spark.Route;
+import util.Splitter;
+
+import java.util.... | Java | ํด๋น ์์ญ์ ๋ถ๋ฆฌํ๋ฉด ์ข์ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,39 @@
+package nextstep.auth.authentication;
+
+import nextstep.member.application.UserDetailsService;
+import nextstep.member.domain.User;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java... | Java | ์๋ ์๊ตฌ์ฌํญ์ด ๋ฐ์๋์ง ์์ ๊ฒ ๊ฐ์์ ๐ข
<img width="516" alt="แแ
ณแแ
ณแ
แ
ตแซแแ
ฃแบ 2022-08-16 แแ
ฉแแ
ฎ 10 07 08" src="https://user-images.githubusercontent.com/17218212/184886987-febc108f-8b2f-403b-a53e-bf36f069cc24.png"> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.