-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
282 additions
and
15 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
backend/src/main/java/net/pengcook/category/controller/CategoryController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.pengcook.category.controller; | ||
|
||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import net.pengcook.category.dto.RecipeOfCategoryRequest; | ||
import net.pengcook.category.service.CategoryService; | ||
import net.pengcook.recipe.dto.MainRecipeResponse; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/categories") | ||
public class CategoryController { | ||
|
||
private final CategoryService categoryService; | ||
|
||
@GetMapping | ||
public List<MainRecipeResponse> readRecipesOfCategory( | ||
@RequestParam String category, | ||
@RequestParam int pageNumber, | ||
@RequestParam int pageSize) { | ||
RecipeOfCategoryRequest request = new RecipeOfCategoryRequest(category, pageNumber, pageSize); | ||
return categoryService.readRecipesOfCategory(request); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/net/pengcook/category/dto/RecipeOfCategoryRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package net.pengcook.category.dto; | ||
|
||
public record RecipeOfCategoryRequest(String category, int pageNumber, int pageSize) { | ||
} |
11 changes: 11 additions & 0 deletions
11
backend/src/main/java/net/pengcook/category/repository/CategoryRecipeRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
package net.pengcook.category.repository; | ||
|
||
import java.util.List; | ||
import net.pengcook.category.domain.CategoryRecipe; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
public interface CategoryRecipeRepository extends JpaRepository<CategoryRecipe, Long> { | ||
|
||
@Query(""" | ||
SELECT cr.recipe.id | ||
FROM CategoryRecipe cr | ||
JOIN Category c ON cr.category.id = c.id | ||
WHERE c.name = :categoryName | ||
""") | ||
List<Long> findRecipeIdsByCategoryName(String categoryName, Pageable pageable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
backend/src/test/java/net/pengcook/category/controller/CategoryControllerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package net.pengcook.category.controller; | ||
|
||
import static org.hamcrest.Matchers.is; | ||
|
||
import io.restassured.RestAssured; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; | ||
import org.springframework.boot.test.web.server.LocalServerPort; | ||
import org.springframework.test.context.jdbc.Sql; | ||
|
||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) | ||
@Sql(value = "/data/category.sql") | ||
class CategoryControllerTest { | ||
|
||
@LocalServerPort | ||
private int port; | ||
|
||
@BeforeEach | ||
void setUp() { | ||
RestAssured.port = port; | ||
} | ||
|
||
@Test | ||
@DisplayName("๋ ์ํผ ๊ฐ์ ๋ชฉ๋ก์ ์กฐํํ๋ค.") | ||
void readRecipes() { | ||
RestAssured.given().log().all() | ||
.queryParam("category", "ํ์") | ||
.queryParam("pageNumber", 0) | ||
.queryParam("pageSize", 3) | ||
.when() | ||
.get("/api/categories") | ||
.then().log().all() | ||
.body("size()", is(3)); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
backend/src/test/java/net/pengcook/category/repository/CategoryRecipeRepositoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.pengcook.category.repository; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.List; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.test.context.jdbc.Sql; | ||
|
||
@DataJpaTest | ||
@Sql("/data/category.sql") | ||
class CategoryRecipeRepositoryTest { | ||
|
||
@Autowired | ||
private CategoryRecipeRepository repository; | ||
|
||
@Test | ||
@DisplayName("์์ฒญํ ์นดํ ๊ณ ๋ฆฌ์ ํ์ด์ง์ ํด๋นํ๋ ๋ ์ํผ id ๋ชฉ๋ก์ ๋ฐํํ๋ค.") | ||
void findRecipeIds() { | ||
Pageable pageable = PageRequest.of(0, 3); | ||
|
||
List<Long> recipeIds = repository.findRecipeIdsByCategoryName("ํ์", pageable); | ||
|
||
assertThat(recipeIds).containsExactlyInAnyOrder(2L, 3L, 7L); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,25 +6,31 @@ | |
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
import java.util.List; | ||
import java.util.stream.Stream; | ||
import net.pengcook.category.dto.RecipeOfCategoryRequest; | ||
import net.pengcook.category.repository.CategoryRecipeRepository; | ||
import net.pengcook.category.repository.CategoryRepository; | ||
import net.pengcook.recipe.domain.Recipe; | ||
import net.pengcook.recipe.dto.MainRecipeResponse; | ||
import net.pengcook.recipe.service.RecipeService; | ||
import net.pengcook.user.domain.User; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.Arguments; | ||
import org.junit.jupiter.params.provider.MethodSource; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | ||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.test.context.jdbc.Sql; | ||
|
||
@DataJpaTest | ||
@Import(CategoryService.class) | ||
@Import({CategoryService.class, RecipeService.class}) | ||
@Sql(scripts = "/data/category.sql") | ||
class CategoryServiceTest { | ||
|
||
private final long INITIAL_CATEGORY_COUNT = 5; | ||
private final long INITIAL_CATEGORY_RECIPE_COUNT = 0; | ||
private final long INITIAL_CATEGORY_COUNT = 10; | ||
private final long INITIAL_CATEGORY_RECIPE_COUNT = 25; | ||
|
||
@Autowired | ||
private CategoryService categoryService; | ||
|
@@ -39,11 +45,34 @@ void saveCategories() { | |
User author = new User("[email protected]", "ela", "์๋ผ", "ela.jpg", LocalDate.of(2024, 7, 22), "KOREA"); | ||
Recipe recipe = new Recipe(1L, "๊น์น๋ณถ์๋ฐฅ", author, LocalTime.of(0, 30, 0), "๊น์น๋ณถ์๋ฐฅ์ด๋ฏธ์ง.jpg", 3, 2, "๊น์น๋ณถ์๋ฐฅ ์กฐ๋ฆฌ๋ฒ"); | ||
|
||
categoryService.saveCategories(recipe, List.of("ํ์", "๋งค์ด์์")); | ||
categoryService.saveCategories(recipe, List.of("๊ฑด๊ฐ์", "๋งค์ด์์")); | ||
|
||
assertAll( | ||
() -> assertThat(categoryRepository.count()).isEqualTo(INITIAL_CATEGORY_COUNT + 1), | ||
() -> assertThat(categoryRecipeRepository.count()).isEqualTo(INITIAL_CATEGORY_RECIPE_COUNT + 2) | ||
); | ||
} | ||
|
||
@ParameterizedTest | ||
@MethodSource("provideParameters") | ||
@DisplayName("ํน์ ์นดํ ๊ณ ๋ฆฌ์ ๋ ์ํผ๋ฅผ ์ฐพ๋๋ค.") | ||
void readRecipesOfCategory(int pageNumber, int pageSize, List<Long> expected) { | ||
RecipeOfCategoryRequest request = new RecipeOfCategoryRequest("ํ์", pageNumber, pageSize); | ||
|
||
List<MainRecipeResponse> mainRecipeResponses = categoryService.readRecipesOfCategory(request); | ||
List<Long> actual = mainRecipeResponses.stream().map(MainRecipeResponse::recipeId).toList(); | ||
|
||
assertAll( | ||
() -> assertThat(actual.size()).isEqualTo(pageSize), | ||
() -> assertThat(actual).containsAll(expected) | ||
); | ||
} | ||
|
||
static Stream<Arguments> provideParameters() { | ||
return Stream.of( | ||
Arguments.of(0, 2, List.of(2L, 3L)), | ||
Arguments.of(1, 2, List.of(7L, 9L)), | ||
Arguments.of(1, 3, List.of(9L, 14L, 15L)) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
SET REFERENTIAL_INTEGRITY FALSE; | ||
SET | ||
REFERENTIAL_INTEGRITY FALSE; | ||
|
||
TRUNCATE TABLE users; | ||
ALTER TABLE users ALTER COLUMN id RESTART; | ||
ALTER TABLE users | ||
ALTER COLUMN id RESTART; | ||
|
||
TRUNCATE TABLE category; | ||
ALTER TABLE category ALTER COLUMN id RESTART; | ||
ALTER TABLE category | ||
ALTER COLUMN id RESTART; | ||
|
||
TRUNCATE TABLE ingredient; | ||
ALTER TABLE ingredient ALTER COLUMN id RESTART; | ||
ALTER TABLE ingredient | ||
ALTER COLUMN id RESTART; | ||
|
||
TRUNCATE TABLE recipe; | ||
ALTER TABLE recipe ALTER COLUMN id RESTART; | ||
ALTER TABLE recipe | ||
ALTER COLUMN id RESTART; | ||
|
||
TRUNCATE TABLE category_recipe; | ||
ALTER TABLE category_recipe ALTER COLUMN id RESTART; | ||
ALTER TABLE category_recipe | ||
ALTER COLUMN id RESTART; | ||
|
||
TRUNCATE TABLE ingredient_recipe; | ||
ALTER TABLE ingredient_recipe ALTER COLUMN id RESTART; | ||
ALTER TABLE ingredient_recipe | ||
ALTER COLUMN id RESTART; | ||
|
||
SET REFERENTIAL_INTEGRITY TRUE; | ||
SET | ||
REFERENTIAL_INTEGRITY TRUE; | ||
|
||
INSERT INTO users (email, username, nickname, image, birth, region) | ||
VALUES ('[email protected]', 'ela', '์๋ผ', 'ela.jpg', '2024-07-22', 'KOREA'); | ||
|
@@ -28,7 +36,108 @@ VALUES ('ํ์'), | |
('์์'), | ||
('์ฑ์'), | ||
('๊ฑด๊ฐ์'), | ||
('๊ฐํธ์'); | ||
('๊ฐํธ์'), | ||
('๋์ ํธ'), | ||
('ํด์ฐ๋ฌผ'), | ||
('๋ฉด์๋ฆฌ'), | ||
('์๋ฌ๋'), | ||
('์คํ'); | ||
|
||
INSERT INTO recipe (title, author_id, cooking_time, thumbnail, difficulty, like_count, description) | ||
VALUES ('๊น์น๋ณถ์๋ฐฅ', 1, '00:30:00', '๊น์น๋ณถ์๋ฐฅ์ด๋ฏธ์ง.jpg', 3, 2, '๊น์น๋ณถ์๋ฐฅ ์กฐ๋ฆฌ๋ฒ'); | ||
VALUES ('๊น์น๋ณถ์๋ฐฅ', 1, '00:30:00', '๊น์น๋ณถ์๋ฐฅ์ด๋ฏธ์ง.jpg', 3, 2, '๊น์น๋ณถ์๋ฐฅ ์กฐ๋ฆฌ๋ฒ'), | ||
('๊น๋ฐฅ', 1, '01:00:00', '๊น๋ฐฅ์ด๋ฏธ์ง.jpg', 8, 1, '๊น๋ฐฅ ์กฐ๋ฆฌ๋ฒ'), | ||
('๊น์น์ฐ๊ฐ', 1, '00:30:00', '๊น์น์ฐ๊ฐ์ด๋ฏธ์ง.jpg', 3, 2, '๊น์น์ฐ๊ฐ ์กฐ๋ฆฌ๋ฒ'), | ||
('ํ ๋งํ ์คํ๊ฒํฐ', 1, '00:30:00', 'ํ ๋งํ ์คํ๊ฒํฐ์ด๋ฏธ์ง.jpg', 3, 2, 'ํ ๋งํ ์คํ๊ฒํฐ ์กฐ๋ฆฌ๋ฒ'), | ||
('๊ฐ์ฅ๊ณ๋๋ฐฅ', 1, '00:10:00', '๊ฐ์ฅ๊ณ๋๋ฐฅ์ด๋ฏธ์ง.jpg', 1, 3, '๊ฐ์ฅ๊ณ๋๋ฐฅ ์กฐ๋ฆฌ๋ฒ'), | ||
('ํผ์', 1, '00:30:00', 'ํผ์์ด๋ฏธ์ง.jpg', 3, 2, 'ํผ์ ์กฐ๋ฆฌ๋ฒ'), | ||
('๋์ฅ์ฐ๊ฐ', 1, '00:30:00', '๋์ฅ์ฐ๊ฐ์ด๋ฏธ์ง.jpg', 3, 2, '๋์ฅ์ฐ๊ฐ ์กฐ๋ฆฌ๋ฒ'), | ||
('ํ๋ฒ๊ฑฐ', 1, '00:30:00', 'ํ๋ฒ๊ฑฐ์ด๋ฏธ์ง.jpg', 3, 2, 'ํ๋ฒ๊ฑฐ ์กฐ๋ฆฌ๋ฒ'), | ||
('ํฐ์๋ฐฅ', 1, '00:40:00', 'ํฐ์๋ฐฅ์ด๋ฏธ์ง.jpg', 2, 4, 'ํฐ์๋ฐฅ ์กฐ๋ฆฌ๋ฒ'), | ||
('์๋ฌ๋', 1, '00:15:00', '์๋ฌ๋์ด๋ฏธ์ง.jpg', 1, 5, '์๋ฌ๋ ์กฐ๋ฆฌ๋ฒ'), | ||
('์ฐ์ด์คํ ์ดํฌ', 1, '00:45:00', '์ฐ์ด์คํ ์ดํฌ์ด๋ฏธ์ง.jpg', 4, 3, '์ฐ์ด์คํ ์ดํฌ ์กฐ๋ฆฌ๋ฒ'), | ||
('์ด์ฝ๋ฆฟ ์ผ์ดํฌ', 1, '01:20:00', '์ด์ฝ๋ฆฟ์ผ์ดํฌ์ด๋ฏธ์ง.jpg', 5, 6, '์ด์ฝ๋ฆฟ ์ผ์ดํฌ ์กฐ๋ฆฌ๋ฒ'), | ||
('๋ฒ ์งํฐ๋ธ ์คํ', 1, '00:50:00', '๋ฒ ์งํฐ๋ธ์คํ์ด๋ฏธ์ง.jpg', 3, 2, '๋ฒ ์งํฐ๋ธ ์คํ ์กฐ๋ฆฌ๋ฒ'), | ||
('์นด๋ ๋ผ์ด์ค', 1, '00:30:00', '์นด๋ ๋ผ์ด์ค์ด๋ฏธ์ง.jpg', 3, 2, '์นด๋ ๋ผ์ด์ค ์กฐ๋ฆฌ๋ฒ'), | ||
('์์ฐ๋ณถ์๋ฐฅ', 1, '00:25:00', '์์ฐ๋ณถ์๋ฐฅ์ด๋ฏธ์ง.jpg', 2, 3, '์์ฐ๋ณถ์๋ฐฅ ์กฐ๋ฆฌ๋ฒ'); | ||
|
||
INSERT INTO category_recipe (category_id, recipe_id) | ||
VALUES (1, 2), -- ๊น๋ฐฅ์ ํ์ | ||
(3, 2), -- ๊น๋ฐฅ์ ์ฑ์ | ||
(1, 3), -- ๊น์น์ฐ๊ฐ๋ ํ์ | ||
(5, 3), -- ๊น์น์ฐ๊ฐ๋ ๊ฐํธ์ | ||
(2, 4), -- ํ ๋งํ ์คํ๊ฒํฐ๋ ์์ | ||
(4, 5), -- ๊ฐ์ฅ๊ณ๋๋ฐฅ์ ๊ฑด๊ฐ์ | ||
(5, 5), -- ๊ฐ์ฅ๊ณ๋๋ฐฅ์ ๊ฐํธ์ | ||
(2, 6), -- ํผ์๋ ์์ | ||
(5, 6), -- ํผ์๋ ๊ฐํธ์ | ||
(1, 7), -- ๋์ฅ์ฐ๊ฐ๋ ํ์ | ||
(5, 7), -- ๋์ฅ์ฐ๊ฐ๋ ๊ฐํธ์ | ||
(2, 8), -- ํ๋ฒ๊ฑฐ๋ ์์ | ||
(5, 8), -- ํ๋ฒ๊ฑฐ๋ ๊ฐํธ์ | ||
(1, 9), -- ํฐ์๋ฐฅ์ ํ์ | ||
(9, 10), -- ์๋ฌ๋๋ ์๋ฌ๋ | ||
(4, 10), -- ์๋ฌ๋๋ ๊ฑด๊ฐ์ | ||
(7, 11), -- ์ฐ์ด์คํ ์ดํฌ๋ ํด์ฐ๋ฌผ | ||
(2, 11), -- ์ฐ์ด์คํ ์ดํฌ๋ ์์ | ||
(6, 12), -- ์ด์ฝ๋ฆฟ ์ผ์ดํฌ๋ ๋์ ํธ | ||
(10, 13),-- ๋ฒ ์งํฐ๋ธ ์คํ๋ ์คํ | ||
(3, 13), -- ๋ฒ ์งํฐ๋ธ ์คํ๋ ์ฑ์ | ||
(1, 14), -- ์นด๋ ๋ผ์ด์ค๋ ํ์ | ||
(5, 14), -- ์นด๋ ๋ผ์ด์ค๋ ๊ฐํธ์ | ||
(7, 15), -- ์์ฐ๋ณถ์๋ฐฅ์ ํด์ฐ๋ฌผ | ||
(1, 15); -- ์์ฐ๋ณถ์๋ฐฅ์ ํ์ | ||
|
||
INSERT INTO ingredient (name) | ||
VALUES ('๊น'), | ||
('์'), | ||
('๊ณ๋'), | ||
('๊น์น'), | ||
('์ค์ด'), | ||
('ํ์ถ'), | ||
('๊ฐ์ฅ'), | ||
('์๊ธ'), | ||
('ํ'), | ||
('ํ ๋งํ '), | ||
('๋ฐ๊ฐ๋ฃจ'), | ||
('์์ฐ'), | ||
('๋ฒํฐ'), | ||
('์คํ'), | ||
('์ด์ฝ๋ฆฟ'), | ||
('๋ฒ์ฏ'), | ||
('์ํ'), | ||
('ํผ๋ง'); | ||
|
||
INSERT INTO ingredient_recipe (ingredient_id, recipe_id, requirement) | ||
VALUES (1, 1, 'REQUIRED'), -- ๊น์น๋ณถ์๋ฐฅ | ||
(2, 1, 'REQUIRED'), -- ๊น์น๋ณถ์๋ฐฅ | ||
(3, 1, 'ALTERNATIVE'), -- ๊น์น๋ณถ์๋ฐฅ | ||
(4, 1, 'OPTIONAL'), -- ๊น์น๋ณถ์๋ฐฅ | ||
(2, 2, 'REQUIRED'), -- ๊น๋ฐฅ | ||
(3, 2, 'OPTIONAL'), -- ๊น๋ฐฅ | ||
(4, 2, 'REQUIRED'), -- ๊น๋ฐฅ | ||
(2, 3, 'REQUIRED'), -- ๊น์น์ฐ๊ฐ | ||
(3, 3, 'REQUIRED'), -- ๊น์น์ฐ๊ฐ | ||
(7, 3, 'REQUIRED'), -- ๊น์น์ฐ๊ฐ | ||
(2, 4, 'REQUIRED'), -- ํ ๋งํ ์คํ๊ฒํฐ | ||
(5, 4, 'OPTIONAL'), -- ํ ๋งํ ์คํ๊ฒํฐ | ||
(8, 5, 'REQUIRED'), -- ๊ฐ์ฅ๊ณ๋๋ฐฅ | ||
(3, 5, 'REQUIRED'), -- ๊ฐ์ฅ๊ณ๋๋ฐฅ | ||
(9, 6, 'REQUIRED'), -- ํผ์ | ||
(6, 6, 'OPTIONAL'), -- ํผ์ | ||
(4, 7, 'REQUIRED'), -- ๋์ฅ์ฐ๊ฐ | ||
(2, 7, 'REQUIRED'), -- ๋์ฅ์ฐ๊ฐ | ||
(8, 8, 'OPTIONAL'), -- ํ๋ฒ๊ฑฐ | ||
(9, 8, 'REQUIRED'), -- ํ๋ฒ๊ฑฐ | ||
(2, 9, 'REQUIRED'), -- ํฐ์๋ฐฅ | ||
(1, 9, 'OPTIONAL'), -- ํฐ์๋ฐฅ | ||
(5, 10, 'REQUIRED'), -- ์๋ฌ๋ | ||
(8, 10, 'OPTIONAL'), -- ์๋ฌ๋ | ||
(10, 4, 'REQUIRED'), -- ํ ๋งํ ์คํ๊ฒํฐ | ||
(11, 6, 'REQUIRED'), -- ํผ์ | ||
(12, 15, 'REQUIRED'), -- ์์ฐ๋ณถ์๋ฐฅ | ||
(13, 15, 'OPTIONAL'), -- ์์ฐ๋ณถ์๋ฐฅ | ||
(14, 12, 'REQUIRED'), -- ์ด์ฝ๋ฆฟ ์ผ์ดํฌ | ||
(15, 12, 'REQUIRED'), -- ์ด์ฝ๋ฆฟ ์ผ์ดํฌ | ||
(16, 13, 'REQUIRED'), -- ๋ฒ ์งํฐ๋ธ ์คํ | ||
(17, 13, 'REQUIRED'), -- ๋ฒ ์งํฐ๋ธ ์คํ | ||
(18, 14, 'OPTIONAL'); -- ์นด๋ ๋ผ์ด์ค |