diff --git a/README.md b/README.md index f11799b..905f615 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ > - [๐Ÿ“ ํŒŒ์ผ ๊ตฌ์กฐ](#ํŒŒ์ผ-๊ตฌ์กฐ) > - [๐Ÿšฉ ์‹œ์ž‘ ๊ฐ€์ด๋“œ](#์‹œ์ž‘-๊ฐ€์ด๋“œ) > - [๐Ÿ–ฅ๏ธ ๊ธฐ์ˆ  ์Šคํƒ](#๊ธฐ์ˆ -์Šคํƒ) +> - [๐ŸŒ BE ๊ฐœ๋ฐœ ์ฃผ์•ˆ์ ](#๊ฐœ๋ฐœ-์ฃผ์•ˆ์ ) +> - [โšก์„ฑ๋Šฅ ์ตœ์ ํ™”](#์„ฑ๋Šฅ-์ตœ์ ํ™”) > - [ยฉ๏ธ License: The MIT License (MIT)](#license)
@@ -54,12 +56,11 @@
## ํŒ€์› ์†Œ๊ฐœ -| | | | | | -|:--:|:----------:|:----------:|:----------:|:----------:| -| ์ด๋ฆ„ | [๋‚จ์›์ •](https://github.com/1jeongg) | [๋ฌธ์„์ค€](https://github.com/seokwns) | [์ฒœ์˜์ฑ„](https://github.com/chaee813)|[๊น€์ •๋„](https://github.com/Rizingblare) | -| ๊ฐœ๋ฐœ ๋ฒ”์œ„ | ํšŒ์›, ๊ฒฐ์ œ, ์ฐœํ•˜๊ธฐ | ํ† ํฐ, ์ด๋ฉ”์ผ, ํฌํŠธํด๋ฆฌ์˜ค, ๊ฒฌ์ ์„œ | ์ฑ„ํŒ…, ๋งค์นญ, ๊ฒฌ์ ์„œ, ๋ฆฌ๋ทฐ | ํฌํŠธํด๋ฆฌ์˜ค | -
+| [๊น€์ฐฌํ˜ธ](https://github.com/kimchanho97) | [์ดํ˜„๋นˆ](https://github.com/blackhblee) | [๋‚จ์›์ •](https://github.com/1jeongg) | [๋ฌธ์„์ค€](https://github.com/seokwns) | [์ฒœ์˜์ฑ„](https://github.com/chaee813) | [๊น€์ •๋„](https://github.com/Rizingblare) | +| :--------------------------------------------------------: | :-------------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :-----------------------------------------------------: | :--------------------------------------------------------: | +| | | | | | | +| FE | FE | BE | BE | BE | BE | ## ์ฃผ์š” ๊ธฐ๋Šฅ @@ -68,29 +69,44 @@ > - ๐Ÿ“œ ๊ฒฌ์ ์„œ > - ๐Ÿ’ฏ ๋ฆฌ๋ทฐ -|๋ถ„๋ฅ˜|๊ธฐ๋Šฅ1|๊ธฐ๋Šฅ2| -|------|------|---| -|ํฌํŠธํด๋ฆฌ์˜ค| ![ํฌํŠธํด๋ฆฌ์˜ค ์กฐํšŒ](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/add60899-8a8f-433f-9ca0-dd68d22970cb) | ![ํฌํŠธํด๋ฆฌ์˜ค ๋“ฑ๋ก](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/65bad53a-0916-40fe-9e3b-7f001034c890) | -| | โ€ข ํ”Œ๋ž˜๋„ˆ๊ฐ€ ๋“ฑ๋กํ•œ ์ •๋ณด, ์ด๋ฏธ์ง€, ๋ฆฌ๋ทฐ ๋“ฑ ์กฐํšŒ
โ€ข ๊ฒ€์ƒ‰๊ณผ ํ•„ํ„ฐ๋ง
โ€ข ๋ฉค๋ฒ„์‹ญ ์‚ฌ์šฉ์ž - ์ง€๋‚œ ๊ณ„์•ฝ ์ •๋ณด(์ง„ํ–‰ ๊ฐ€๊ฒฉ, ์—…์ฒด ๋“ฑ) ์กฐํšŒ
โ€ข ์ฐœํ•˜๊ธฐ | โ€ข ํ”Œ๋ž˜๋„ˆ์˜ ์†Œ๊ฐœ, ๊ฐ€๊ฒฉ ๋“ฑ์˜ ์ •๋ณด๋ฅผ ๋“ฑ๋ก
โ€ข ์ˆ˜์ • ๋ฐ ์‚ญ์ œ | -|์ฑ„ํŒ… ์ƒ๋‹ด| ![์ฑ„ํŒ… ์ƒ๋‹ด](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/5741cb65-a3ff-4260-954d-be354dc25964)| | -|๊ฒฌ์ ์„œ| ![์˜ˆ๋น„ ๋ถ€๋ถ€ ๊ฒฌ์ ์„œ](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/20fbc800-3808-4e73-a545-63356b9ff47c) | ![ํ”Œ๋ž˜๋„ˆ ๊ฒฌ์ ์„œ](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/764d33a5-e988-4667-9329-ccbc245169df) | -| | โ€ข ๊ฒฌ์ ์„œ ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
โ€ข ๊ฒฌ์ ์„œ ๋งค์นญ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
โ€ข ๋งค์นญ ํ™•์ • | โ€ข ๊ฒฌ์ ์„œ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ
โ€ข ๊ฒฌ์ ์„œ 1๊ฐœ ํ™•์ • | -| ๋ฆฌ๋ทฐ | ![๋ฆฌ๋ทฐ](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/7e4d7927-9f1d-4468-b062-b598f80cb84b) | | -| | โ€ข ๋ฆฌ๋ทฐ ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
โ€ข ๋ฆฌ๋ทฐ ํ”Œ๋ž˜๋„ˆ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
โ€ข ๋ฆฌ๋ทฐ ์ƒ์„ธ ์กฐํšŒ
โ€ข ๋“ฑ๋ก ์ˆ˜์ • ์‚ญ์ œ | | +| ํฌํŠธํด๋ฆฌ์˜ค ํƒ์ƒ‰ | ๊ฒ€์ƒ‰ ๋ฐ ํ•„ํ„ฐ๋ง | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| | | +| โ€ข ํ”Œ๋ž˜๋„ˆ๊ฐ€ ๋“ฑ๋กํ•œ ์ •๋ณด, ์ด๋ฏธ์ง€, ๋ฆฌ๋ทฐ ๋“ฑ ์กฐํšŒ
โ€ข ๋ฉค๋ฒ„์‹ญ ์‚ฌ์šฉ์ž - ์ด์ „ ๊ณ„์•ฝ ์ •๋ณด(๊ฐ€๊ฒฉ, ์—…์ฒด ๋“ฑ) ์กฐํšŒ
| โ€ข ์ง€์—ญ๊ณผ ๊ฐ€๊ฒฉ ๋“ฑ ํ•„ํ„ฐ๋ง ์กฐ๊ฑด ์„ค์ •
โ€ข ํ”Œ๋ž˜๋„ˆ ์ด๋ฆ„ ๊ฒ€์ƒ‰ | + +| ์ฑ„ํŒ… ์ „์†ก | ์ฑ„ํŒ… ์‘๋‹ต | +| ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| | | +| โ€ข ์ด๋ฏธ์ง€ ์ „์†ก | โ€ข ์ฝ์Œ ์œ ๋ฌด ํ‘œ์‹œ
โ€ข ์•ˆ ์ฝ์€ ๋ฉ”์‹œ์ง€ ๊ฐœ์ˆ˜ ํ‘œ์‹œ | + +| ํฌํŠธํด๋ฆฌ์˜ค ์ž‘์„ฑ / ์ˆ˜์ • | ๊ฒฌ์ ์„œ ์ž‘์„ฑ / ์ˆ˜์ • | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| | | +| โ€ข ํ”Œ๋ž˜๋„ˆ์˜ ์†Œ๊ฐœ, ๊ฐ€๊ฒฉ ๋“ฑ์˜ ์ •๋ณด๋ฅผ ๋“ฑ๋ก
โ€ข ์ˆ˜์ • ๋ฐ ์‚ญ์ œ | โ€ข ๊ฒฌ์ ์„œ ํ•ญ๋ชฉ์— ๋Œ€ํ•œ ์ •๋ณด ๋“ฑ๋ก
โ€ข ์ˆ˜์ • ๋ฐ ์‚ญ์ œ | +| ๋ฆฌ๋ทฐ ์ž‘์„ฑ / ์ˆ˜์ • | ๋ฆฌ๋ทฐ ์กฐํšŒ | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| | | +| โ€ข ํ”Œ๋ž˜๋„ˆ์˜ ๋ณ„์  ๋ฐ ํ›„๊ธฐ ๋“ฑ๋ก
โ€ข ์ˆ˜์ • ๋ฐ ์‚ญ์ œ | โ€ข ํ•ด๋‹น ํ”Œ๋ž˜๋„ˆ์˜ ๋ฆฌ๋ทฐ ์กฐํšŒ | + +| ๊ฒฐ์ œ | ์ฐœํ•˜๊ธฐ | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| | | +| โ€ข ํ† ์Šค ํŽ˜์ด๋จผ์ธ  ์—ฐ๋™
โ€ข ๊ฒฐ์ œ ์Šน์ธ & ์œ ์ € ๋“ฑ๊ธ‰ ์—…๊ทธ๋ ˆ์ด๋“œ | โ€ข ์ฐœํ•˜๊ธฐ ๋“ฑ๋ก ๋ฐ ์‚ญ์ œ
โ€ข ์ฐœํ•˜๊ธฐ ๋ชจ์•„๋ณด๊ธฐ |
## ๋งํฌ ๋ชจ์Œ -| ๊ธฐํš | ๋””์ž์ธ | ๊ฐœ๋ฐœ | ๋ฐฐํฌ | -|------|-------|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------| -| [๋…ธ์…˜](https://unmarred-belief-362.notion.site/f11783c42731479ca1f6c9a97a738324?pvs=4) | [์™€์ด์–ดํ”„๋ ˆ์ž„](https://www.figma.com/file/Wcz9d59GIQqwTEAfIEmRly/SUNSU-WEDDING?type=design&node-id=0%3A1&mode=design&t=5PnD2GPs3WktbNNy-1) | [๋ฐฑ์—”๋“œ ๊นƒํ—ˆ๋ธŒ](https://github.com/Step3-kakao-tech-campus/Team5_BE) | [ํ”„๋ก ํŠธ ๋ฐฐํฌ ์ฃผ์†Œ](https://k5c1813d97f50a.user-app.krampoline.com/) | -| [๊ธฐํš์•ˆ PPT](https://www.figma.com/file/A81sCNiwoLUfSe5aqXEHXr/%EC%B9%B4%ED%85%8C%EC%BA%A0-5%EC%A1%B0---%EA%B8%B0%ED%9A%8D%EC%95%88?type=design&node-id=972-145&mode=design&t=QdcoBgtPZi631myk-0) | | [ERD](https://www.erdcloud.com/d/fww6HRj7oXL9cdp5t) | [๋ฐฑ์—”๋“œ / ํ’€์Šคํƒ ๋ฐฐํฌ ์ฃผ์†Œ](https://k0b2de7d86228a.user-app.krampoline.com/) | -| [Survey](https://unmarred-belief-362.notion.site/Survey-a4c9ba9b8114456f88faa61b33f232c9) | | [API ๋ฌธ์„œ](https://unmarred-belief-362.notion.site/6fd74038970941a2ad02df0045705095?v=545b8da990c74661b2b6b560009766ff) | | -| | | [ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค ๋ช…์„ธ์„œ](https://unmarred-belief-362.notion.site/FE-93d000ab86f44dcf8ea1c99d8d0b1fa4?pvs=4) | [์œ ํŠœ๋ธŒ](https://youtu.be/WfDcwd8AQNQ) | -| | | [ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ ๋ณด๊ณ ์„œ](https://unmarred-belief-362.notion.site/FE-abc1a99b7e14459ea5e8ee25957a3053?pvs=4) | | +| ๊ธฐํš | ๋””์ž์ธ | ๊ฐœ๋ฐœ | ๋ฐฐํฌ | +|------|-------|------|------| +| [๋…ธ์…˜](https://unmarred-belief-362.notion.site/f11783c42731479ca1f6c9a97a738324?pvs=4) | [์™€์ด์–ดํ”„๋ ˆ์ž„](https://www.figma.com/file/Wcz9d59GIQqwTEAfIEmRly/SUNSU-WEDDING?type=design&node-id=0%3A1&mode=design&t=5PnD2GPs3WktbNNy-1) | [ํ”„๋ก ํŠธ ๊นƒํ—ˆ๋ธŒ](https://github.com/Step3-kakao-tech-campus/Team5_FE) | [ํ’€์Šคํƒ ๋ฐฐํฌ ์ฃผ์†Œ - ํ˜„์žฌ ๋™์ž‘ X](https://k6f3d3b1a0696a.user-app.krampoline.com) | +| [๊ธฐํš์•ˆ PPT](https://www.figma.com/file/A81sCNiwoLUfSe5aqXEHXr/%EC%B9%B4%ED%85%8C%EC%BA%A0-5%EC%A1%B0---%EA%B8%B0%ED%9A%8D%EC%95%88?type=design&node-id=972-145&mode=design&t=QdcoBgtPZi631myk-0) | | [ERD](https://www.erdcloud.com/d/fww6HRj7oXL9cdp5t) | [ํ”„๋ก ํŠธ ํ…Œ์ŠคํŠธ์šฉ ๋ฐฐํฌ ์ฃผ์†Œ - ํ˜„์žฌ ๋™์ž‘ X](https://k5c1813d97f50a.user-app.krampoline.com/) +| [Survey](https://unmarred-belief-362.notion.site/Survey-a4c9ba9b8114456f88faa61b33f232c9) | | [API ๋ฌธ์„œ](https://unmarred-belief-362.notion.site/6fd74038970941a2ad02df0045705095?v=545b8da990c74661b2b6b560009766ff) | | +| | | [ํ…Œ์ŠคํŠธ ์‹œ๋‚˜๋ฆฌ์˜ค ๋ช…์„ธ์„œ](https://unmarred-belief-362.notion.site/BE-3d4e69e38d6a498d8f9e790945660790?pvs=4) | | +| | | [ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ ๋ณด๊ณ ์„œ](https://unmarred-belief-362.notion.site/BE-d5eade6a1d6f4bed9933eebd5899b6a8?pvs=4) | | +
@@ -98,7 +114,51 @@ ![ERD](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/2f6cf5f5-64d5-4a89-9b84-a9f552b9cc6d) ## API ๋ชจ์•„๋ณด๊ธฐ -API ๋ชจ์•„๋ณด๊ธฐ + +|์ด๋ฆ„|url|์‚ฌ์šฉ์ž|๋ฉ”์„œ๋“œ| +|:--|:--|:----|:-----| +|//ํšŒ์›//|||| +|๐Ÿ‘ค ํšŒ์›๊ฐ€์ž…| /api/user/signup| `๊ณตํ†ต` |`POST`| +|๐Ÿ‘ค ๋กœ๊ทธ์ธ| /api/user/login |`๊ณตํ†ต` |`POST`| +|๐Ÿ‘ค ์œ ์ € ์ •๋ณด ์กฐํšŒ| /api/user/info | `๊ณตํ†ต` |`GET`| +|๐Ÿ‘ค ํ† ํฐ ๊ฐฑ์‹ | /api/user/token |`๊ณตํ†ต` | `POST` | +|๐Ÿ‘ค ํšŒ์›ํƒˆํ‡ด| /api/user |`๊ณตํ†ต`| `DELETE`| +|// ์ด๋ฉ”์ผ // |||| +|โœ‰๏ธ ์ด๋ฉ”์ผ ์ธ์ฆ ์ฝ”๋“œ ์ „์†ก| /api/mail |`๊ณตํ†ต` |`POST`| +|โœ‰๏ธ ์ด๋ฉ”์ผ ์ธ์ฆ ์ฝ”๋“œ ๊ฒ€์ฆ| /api/mail/verify| `๊ณตํ†ต`| `POST`| +|// ๊ฒฐ์ œ // |||| +|๐Ÿ’ณ ๊ฒฐ์ œ ๋ฐ์ดํ„ฐ ์ €์žฅ| /api/payment/save| `๊ณตํ†ต`| `POST`| +|๐Ÿ’ณ ๊ฒฐ์ œ ์Šน์ธ ๋ฐ ์—…๊ทธ๋ ˆ์ด๋“œ| /api/payment/approve| `๊ณตํ†ต`| `POST` | +|// ํฌํŠธํด๋ฆฌ์˜ค // |||| +|โœ๏ธ ๊ฒŒ์‹œ๊ธ€ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ| /api/portfolio?cursor={nextCursor} |`๊ณตํ†ต`| `GET`| +|โœ๏ธ๋ณธ์ธ ๊ฒŒ์‹œ๊ธ€ ์กฐํšŒ(ํ”Œ๋ž˜๋„ˆ)| /api/portfolio/self| `์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ`| `GET`| +|โœ๏ธ์ƒ์„ธ ๊ฒŒ์‹œ๊ธ€ ์กฐํšŒ| /api/portfolio/{portfolio_id} | `๊ณตํ†ต`| `GET`| +|โœ๏ธ๊ฒŒ์‹œ๊ธ€ ๋“ฑ๋ก| /api/portfolio |`์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ` |`POST`| +|โœ๏ธ๊ฒŒ์‹œ๊ธ€ ์ˆ˜์ • |/api/portfolio |`์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ`| `PUT`| +|โœ๏ธ๊ฒŒ์‹œ๊ธ€ ์‚ญ์ œ| /api/portfolio |`์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ`| `DELETE`| +|// ์ฑ„ํŒ… // |||| +|๐Ÿ—จ๏ธ ์ฑ„ํŒ…๋ฐฉ ์ƒ์„ฑํ•˜๊ธฐ| /api/chat |`์˜ˆ๋น„ ๋ถ€๋ถ€` |`POST`| +|// ๋งค์นญ // |||| +|๐Ÿ“Œ ๋งค์นญ ํ™•์ •(๊ฒฌ์ ์„œ ์ „์ฒด ํ™•์ •)| /api/match/confirm?chatId={chatId} |`์˜ˆ๋น„ ๋ถ€๋ถ€`| `POST`| +|๐Ÿ“Œ ๋ฆฌ๋ทฐ ์ž‘์„ฑ ๊ฐ€๋Šฅํ•œ ๋งค์นญ ์กฐํšŒ| /api/match/review |`์˜ˆ๋น„ ๋ถ€๋ถ€`| `GET`| +|// ๊ฒฌ์ ์„œ // |||| +|๐Ÿ“œ ๊ฒฌ์ ์„œ ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ| /api/quotation/all?page={page} |`๊ณตํ†ต` |`GET`| +|๐Ÿ“œ ๊ฒฌ์ ์„œ ๋งค์นญ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ |/api/quotation?chatId={chatId}| `๊ณตํ†ต` |`GET`| +|๐Ÿ“œ ๊ฒฌ์ ์„œ ๋“ฑ๋ก| /api/quotation?chatId={chatId}| `์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ` `POST`| +|๐Ÿ“œ ๊ฒฌ์ ์„œ ์ˆ˜์ •| /api/quotation/{quotationId}?chatId={chatId}| `์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ` |`PUT`| +|๐Ÿ“œ ๊ฒฌ์ ์„œ 1๊ฐœ ํ™•์ • |/api/quotation/confirm/{quotationId}?chatId={chatId} |`์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ`| `POST`| +|๐Ÿ“œ ๊ฒฌ์ ์„œ ์‚ญ์ œ| /api/quotation/{quotationId} |`์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ`| `DELETE`| +|// ๋ฆฌ๋ทฐ // |||| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ |/api/review/all |`์˜ˆ๋น„ ๋ถ€๋ถ€`|`GET`| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ํ”Œ๋ž˜๋„ˆ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ |/api/review?plannerId={plannerId}&page={page} |`๊ณตํ†ต`| `GET`| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ์ƒ์„ธ ์กฐํšŒ| /api/review/{reviewId} |`์˜ˆ๋น„ ๋ถ€๋ถ€` |`GET`| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ๋“ฑ๋ก| /api/review?chatId={chatId} |`์˜ˆ๋น„ ๋ถ€๋ถ€`|`POST`| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ์ˆ˜์ •| /api/review/{reviewId}| `์˜ˆ๋น„ ๋ถ€๋ถ€`| `PUT`| +|๐Ÿ’ฏ ๋ฆฌ๋ทฐ ์‚ญ์ œ |/api/review/{reviewId} |`์˜ˆ๋น„ ๋ถ€๋ถ€`| `DELETE`| +|// ์ฐœํ•˜๊ธฐ // |||| +|โค๏ธ ์ฐœ ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ | /api/favorite?page={page} |`๊ณตํ†ต`| `GET`| +|โค๏ธ ์ฐœ ๋“ฑ๋กํ•˜๊ธฐ |/api/favorite/{portfolioId} |`๊ณตํ†ต`| `POST`| +|โค๏ธ ์ฐœ ์‚ญ์ œํ•˜๊ธฐ |/api/favorite/{portfolioId}| `๊ณตํ†ต` |`DELETE`| ## ํŒŒ์ผ ๊ตฌ์กฐ ``` @@ -149,6 +209,17 @@ โ””โ”€โ”€โ”€๐Ÿ“_core ``` +ํด๋” ๋‚ด๋ถ€ ๊ตฌ์กฐ +``` +- Entity.java +- DTOConverter.java +- JPARepository.java +- Request.java +- Response.java +- RestController.java +- Service.java +- ServiceImpl.java +```
## ์‹œ์ž‘ ๊ฐ€์ด๋“œ @@ -176,10 +247,263 @@ java -jar sunsu-wedding-0.0.1-SNAPSHOT.jar ## ๊ธฐ์ˆ  ์Šคํƒ -![๊ธฐ์ˆ  ์Šคํƒ)](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/1710fc38-9fc3-44d1-b9f9-e2893129eda1) +![๊ธฐ์ˆ ์Šคํƒ](https://github.com/Step3-kakao-tech-campus/Team5_BE/assets/84652886/62444da9-f45d-4c7a-a046-449da0445592) + +
+ +## ๊ฐœ๋ฐœ ์ฃผ์•ˆ์  + +### ๐Ÿ–ฅ๏ธ ์ฝ”๋“œ ์ปจ๋ฒค์…˜ + +**๋„ค์ด๋ฐ ๊ทœ์น™** +> - ํด๋” ์ด๋ฆ„: ์†Œ๋ฌธ์ž +> - ํŒŒ์ผ๋ช…, ๋ณ€์ˆ˜๋ช…, ๋ฉ”์„œ๋“œ๋ช…: `CamelCase` +> - ์—”ํ‹ฐํ‹ฐ์˜ ํ•„๋“œ๋„ค์ž„: `snake_case` +> - ์ƒ์ˆ˜: `UPPER_CASE` +> - ํ…Œ์ด๋ธ” ์ด๋ฆ„: `snake_case_tb` +> - CRUD ๋„ค์ด๋ฐ ํ†ต์ผ (์ƒ์„ฑ โ†’ `save` / ์กฐํšŒ โ†’ `find` / ์ˆ˜์ • โ†’ `update` / ์‚ญ์ œ โ†’ `delete`) + +**์ฝ”๋“œ** +> - `record` ์‚ฌ์šฉํ•˜๊ธฐ, `DTOConverter`์—์„œ Entity -> DTO๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ +> - `Annotation` ์ˆœ์„œ ์„ค์ •: ํด๋ž˜์Šค โ†’ ํ•„๋“œ โ†’ ์ƒ์„ฑ์ž โ†’ ๋ฉ”์„œ๋“œ +> - Class ์ „์ฒด์— `@Transactional(readOnly = true)`๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ํ•„์š”ํ•œ ๋ฉ”์„œ๋“œ์— `@Transactional` ์‚ฌ์šฉํ•˜๊ธฐ +> - ์ƒํƒœ, ๋“ฑ๊ธ‰ ๋“ฑ constantํ•œ ๊ฐ’์„ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋‚ด์šฉ์€ `enum` ํƒ€์ž…์œผ๋กœ ๋ถ„๋ฆฌํ•˜๊ธฐ +> - DB๋ฅผ ์ž˜๋ชป ์‚ญ์ œํ•˜๋Š” ๊ฑธ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ ๊ฐ table๋งˆ๋‹ค `is_active` ํ•„๋“œ๋ฅผ ํ†ตํ•ด `SQLDelete`ํ™œ์šฉํ•˜๊ธฐ + +**ํ…Œ์ŠคํŠธ** +> - Assertions.assertThat, assertThrows๋Š” `static import`ํ•˜๊ธฐ +> - RepositoryTest๋Š” `DummyEntity`์—์„œ ์ƒ์„ฑํ•ด์„œ, ControllerTest๋Š” `teardown.sql`์—์„œ ๊ฐ€์ ธ์™€์„œ ํ…Œ์ŠคํŠธ ํ•˜๊ธฐ +> - `logResult()` ํ•จ์ˆ˜๋ฅผ ๋”ฐ๋กœ ๋นผ์„œ ์ค‘๋ณต ์ฝ”๋“œ ์ค„์ด๊ธฐ + +
+ +### ๐Ÿ‘ค ์œ ์ €๋ณ„ ๊ธฐ๋Šฅ ์ ‘๊ทผ ์ œํ•œ +1๏ธ. ๋กœ๊ทธ์ธ ์œ ๋ฌด์— ๋”ฐ๋ฅธ ๊ธฐ๋Šฅ ์ ‘๊ทผ ์ œํ•œ - `401 UnAuthorized` + +|๋กœ๊ทธ์ธ ํ•„์š” X|๐Ÿ‘ค ํšŒ์› |ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ | +|:-------------|:-------|:------------------| +||โœ‰๏ธ ๋ฉ”์ผ|์ธ์ฆ ์ฝ”๋“œ ์ „์†ก, ๊ฒ€์ฆ| +||โœ๏ธ ํฌํŠธํด๋ฆฌ์˜ค| ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ์ƒ์„ธ ์กฐํšŒ| +|๋กœ๊ทธ์ธ ํ•„์š” O| ๐Ÿ‘ค ํšŒ์›| ํšŒ์›ํƒˆํ‡ด, ์œ ์ € ์ •๋ณด ์กฐํšŒ, ํ† ํฐ ๊ฐฑ์‹ | +|| ๐Ÿ’ณ ๊ฒฐ์ œ| ๊ฒฐ์ œ ๋ฐ์ดํ„ฐ ์ €์žฅ, ๊ฒฐ์ œ ์Šน์ธ ๋ฐ ์—…๊ทธ๋ ˆ์ด๋“œ| +|| โœ๏ธ ํฌํŠธํด๋ฆฌ์˜ค| ๋ณธ์ธ ๊ฒŒ์‹œ๊ธ€ ์กฐํšŒ, ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ| +|| ๐Ÿ—จ๏ธ ์ฑ„ํŒ…| ์ฑ„ํŒ…๋ฐฉ ์ƒ์„ฑ| +|| ๐Ÿ“Œ ๋งค์นญ| ๋งค์นญ ํ™•์ •, ๋ฆฌ๋ทฐ ์ž‘์„ฑ ๊ฐ€๋Šฅํ•œ ๋งค์นญ ์กฐํšŒ| +|| ๐Ÿ“œ ๊ฒฌ์ ์„œ| ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ๋งค์นญ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ๊ฒฌ์ ์„œ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ, 1๊ฐœ ํ™•์ •| +|| ๐Ÿ’ฏ ๋ฆฌ๋ทฐ| ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ํ”Œ๋ž˜๋„ˆ๋ณ„ ๋ฆฌ๋ทฐ ์กฐํšŒ, ์ƒ์„ธ ์กฐํšŒ, ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ| +|| โค๏ธ ์ฐœํ•˜๊ธฐ| ์ฐœ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ๋“ฑ๋ก, ์‚ญ์ œ| + +
+ +2๏ธ. ์‚ฌ์šฉ์ž role์— ๋”ฐ๋ฅธ ๊ธฐ๋Šฅ ์ ‘๊ทผ ์ œํ•œ - `403 Forbidden` +|๊ณตํ†ต|๐Ÿ‘ค ํšŒ์› |ํšŒ์›๊ฐ€์ž…, ๋กœ๊ทธ์ธ, ์œ ์ € ์ •๋ณด ์กฐํšŒ, ํ† ํฐ ๊ฐฑ์‹ , ํšŒ์› ํƒˆํ‡ด | +|:-------------|:-------|:------------------| +|| โœ‰๏ธ ๋ฉ”์ผ| ์ธ์ฆ ์ฝ”๋“œ ์ „์†ก, ๊ฒ€์ฆ| +|| ๐Ÿ’ณ ๊ฒฐ์ œ| ๊ฒฐ์ œ ๋ฐ์ดํ„ฐ ์ €์žฅ, ๊ฒฐ์ œ ์Šน์ธ ๋ฐ ์—…๊ทธ๋ ˆ์ด๋“œ| +|| โœ๏ธ ํฌํŠธํด๋ฆฌ์˜ค| ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ์ƒ์„ธ ์กฐํšŒ| +|| ๐Ÿ“œ ๊ฒฌ์ ์„œ| ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ๋งค์นญ๋ณ„ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ| +|| ๐Ÿ’ฏ ๋ฆฌ๋ทฐ| ํ”Œ๋ž˜๋„ˆ๋ณ„ ๋ฆฌ๋ทฐ ์กฐํšŒ| +|| โค๏ธ ์ฐœํ•˜๊ธฐ| ์ฐœ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ๋“ฑ๋ก, ์‚ญ์ œ| +|ํ”Œ๋ž˜๋„ˆ | โœ๏ธ ํฌํŠธํด๋ฆฌ์˜ค| ๋ณธ์ธ ๊ฒŒ์‹œ๊ธ€ ์กฐํšŒ, ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ| +|| ๐Ÿ“œ ๊ฒฌ์ ์„œ| ๊ฒฌ์ ์„œ ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ, 1๊ฐœ ํ™•์ •| +|| ๐Ÿ—จ๏ธ ์ฑ„ํŒ…| ์ฑ„ํŒ…๋ฐฉ ์ƒ์„ฑ| +|| ๐Ÿ“Œ ๋งค์นญ| ๋งค์นญ ํ™•์ •, ๋ฆฌ๋ทฐ ์ž‘์„ฑ ๊ฐ€๋Šฅํ•œ ๋งค์นญ ์กฐํšŒ| +|์˜ˆ๋น„ ๋ถ€๋ถ€| ๐Ÿ—จ๏ธ ์ฑ„ํŒ…| ์ฑ„ํŒ…๋ฐฉ ์ƒ์„ฑ| +|| ๐Ÿ“Œ ๋งค์นญ| ๋งค์นญ ํ™•์ •, ๋ฆฌ๋ทฐ ์ž‘์„ฑ ๊ฐ€๋Šฅํ•œ ๋งค์นญ ์กฐํšŒ| +|| ๐Ÿ’ฏ ๋ฆฌ๋ทฐ| ์ „์ฒด ๋ฆฌ์ŠคํŠธ ์กฐํšŒ, ์ƒ์„ธ ์กฐํšŒ, ๋“ฑ๋ก, ์ˆ˜์ •, ์‚ญ์ œ| + +
+ +### โ™ป๏ธ Access, Refresh Token + +๐Ÿช™ **JWT ๋„์ž…** + +์œ ์ € ์ •๋ณด ์ธ์ฆ์„ ์œ„ํ•ด ****JWT๋ฅผ ๋„์ž…ํ•˜์˜€์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์œ ์ €๋Š” access token์„ ๊ฐ€์ง€๊ณ  ์ธ์ฆ์„ ์ง„ํ–‰ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋•Œ, access token์€ API๋ฅผ ์š”์ฒญํ•  ๋•Œ๋งˆ๋‹ค ํ—ค๋”์— ์ถ”๊ฐ€ํ•˜์—ฌ ์ „์†ก๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋„คํŠธ์›Œํฌ์ƒ์— ๋งŽ์ด ๋…ธ์ถœ๋˜๊ณ , ํƒˆ์ทจ๋  ํ™•๋ฅ ๋„ ๋†’์Šต๋‹ˆ๋‹ค. + +๊ทธ๋ฆฌ๊ณ  ์œ ์ €๊ฐ€ ๋กœ๊ทธ์ธ์„ ์ž์ฃผํ•˜๋Š” ๋ถˆํŽธํ•จ ์—†์ด ์˜ค๋ž˜ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ํ† ํฐ์˜ ์œ ํšจ๊ธฐ๊ฐ„์ด ๊ธธ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ๊ธธ๊ฒŒ ์„ค์ •ํ•˜๋ฉด, ํƒˆ์ทจ๋‹นํ•œ ํ† ํฐ์œผ๋กœ ํ•ด์ปค๋Š” ์˜ค๋žœ ๊ธฐ๊ฐ„๋™์•ˆ ์œ ์ €์˜ ์ •๋ณด๋ฅผ ์ด์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. + +๋”ฐ๋ผ์„œ access token์˜ ์œ ํšจ๊ธฐ๊ฐ„์„ ์งง๊ฒŒ ๊ฐ€์ ธ๊ฐ€๋ฉด์„œ ์ƒ๋Œ€์ ์œผ๋กœ ๊ธฐ๊ฐ„์ด ๊ธด refresh token์„ ๋„์ž…ํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. + +--- + +โœ… **Refresh Token ๋„์ž…** +1. ์œ ์ €๋Š” ์ตœ์ดˆ ๋กœ๊ทธ์ธ์„ ํ•˜๋ฉด access token, refresh token ๋‘๊ฐ€์ง€๋ฅผ ๋ฐœ๊ธ‰๋ฐ›์Šต๋‹ˆ๋‹ค. +2. ์œ ์ €๋Š” access token๋งŒ์„ ๊ฐ€์ง€๊ณ  ์ธ์ฆ์„ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค. +3. access token์ด ๋งŒ๋ฃŒ๋˜๋ฉด, ์„œ๋ฒ„์—์„œ๋Š” ํ† ํฐ ๋งŒ๋ฃŒ ์—๋Ÿฌ๋ฅผ ์ „์†กํ•ฉ๋‹ˆ๋‹ค. +4. ์ด๋ฅผ ๋ฐ›์€ ํด๋ผ์ด์–ธํŠธ๋Š” access token๊ณผ refresh token์„ ๊ฐ€์ง€๊ณ  ํ† ํฐ ์žฌ๋ฐœ๊ธ‰ ์š”์ฒญ์„ ํ•ฉ๋‹ˆ๋‹ค. +5. ์„œ๋ฒ„๋Š” ๋‘ ํ† ํฐ์„ ๋ชจ๋‘ ์ƒˆ๋กœ ๋ฐœ๊ธ‰ํ•˜๊ณ  ์œ ์ €๋Š” ์ƒˆ๋กœ ๋ฐœ๊ธ‰๋ฐ›์€ ๋‘ ํ† ํฐ์„ ์ €์žฅ ํ›„, ๋‹ค์‹œ access token์„ ํ†ตํ•ด ์ธ์ฆ ๊ณผ์ •์„ ๊ฑฐ์น˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. + +๋ณด์•ˆ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด ํƒˆ์ทจ๋‹นํ•˜๋Š” ๊ฒฝ์šฐ๋ฅผ ๊ณ ๋ฏผํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค. + +> **a. ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ๋งŒ ํƒˆ์ทจ๋‹นํ•œ ๊ฒฝ์šฐ** +> - ํ† ํฐ ์žฌ๋ฐœ๊ธ‰์„ ํ•  ๋•Œ, ์ด์ „์— ๋ฐœ๊ธ‰ํ–ˆ๋˜ access token, refresh token ๋‘๊ฐœ๋ฅผ ๋ชจ๋‘ ์‚ฌ์šฉํ•ด์•ผ ์žฌ๋ฐœ๊ธ‰์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋‘˜ ์ค‘ ํ•˜๋‚˜์˜ ํ† ํฐ๋งŒ์„ ํƒˆ์ทจํ–ˆ๋‹ค๋ฉด, ์žฌ๋ฐœ๊ธ‰์ด ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. +> - ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ๋งŒ ์กด์žฌํ•˜๋ฉด ์ธ์ฆ๋„ ๋ถˆ๊ฐ€๋Šฅํ•˜๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ๋งŒ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๋ฉด, ํ•ด์ปค๋Š” ์ธ์ฆ์„ ์ง„ํ–‰ํ•  ์ˆ˜ ์—†์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. +> +> **b. ๋ชจ๋“  ํ† ํฐ์ด ํƒˆ์ทจ๋‹นํ•œ ๊ฒฝ์šฐ** +> - ๋จผ์ € access token์˜ ์œ ํšจ์‹œ๊ฐ„์ด ๋‚จ์•„์žˆ๋‹ค๋ฉด, ์žฌ๋ฐœ๊ธ‰์„ ๋ฐ›์„ ์ˆ˜ ์—†๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. +> - ๋งŒ์•ฝ ๋งŒ๋ฃŒ ์‹œ๊ฐ„์— ๋งž์ถ”์–ด ํ•ด์ปค๊ฐ€ ์žฌ๋ฐœ๊ธ‰์„ ํ–ˆ๋‹ค๋ฉด, ์„œ๋ฒ„์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ํ† ํฐ ์Œ๊ณผ ์ •์ƒ ์œ ์ €๊ฐ€ ์žฌ๋ฐœ๊ธ‰์„ ์š”์ฒญํ•œ ํ† ํฐ ์Œ์ด ๋‹ค๋ฅผ ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— ์ •์ƒ ์œ ์ €๋Š” ์žฌ๋กœ๊ทธ์ธ์„ ํ†ตํ•ด ์ƒˆ๋กœ์šด ํ† ํฐ ์Œ์„ ๋ฐœ๊ธ‰๋ฐ›์Šต๋‹ˆ๋‹ค. ์žฌ๋ฐœ๊ธ‰์„ ๋ฐ›๊ฒŒ ๋˜๋ฉด, ํ•ด์ปค์˜ ํ† ํฐ์ด ํ๊ธฐ๋˜๊ณ  ์œ ์ €๋Š” ์ •์ƒ์ ์œผ๋กœ ๋‹ค์‹œ ์ด์šฉ์ด ๊ฐ€๋Šฅํ•ด์ง‘๋‹ˆ๋‹ค. ํ•ด์ปค๋Š” ์œ ํšจํ•˜์ง€ ์•Š์€ ํ† ํฐ์Œ์„ ๊ฐ€์ง€๊ณ  ์žˆ์œผ๋ฏ€๋กœ ์žฌ์ธ์ฆ ๋ฐ ์žฌ๋ฐœ๊ธ‰์ด ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. +> +> **c. ๋กœ๊ทธ์ธ ์‹œ ์ƒˆ๋กœ์šด JWT ๋ฐœ๊ธ‰** +> - ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅ๋œ ํ† ํฐ ์ •๋ณด๋ฅผ ๋‹ค์‹œ ์ค€๋‹ค๋ฉด, ํ•ด์ปค๋Š” ํƒ€์ด๋ฐ๋งŒ ๋งž์ถ˜๋‹ค๋ฉด ๋ฌดํ•œ์ • ํ•ดํ‚น์ด ๊ฐ€๋Šฅํ•ด์ง‘๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋กœ๊ทธ์ธ์„ ํ•  ๊ฒฝ์šฐ, ๊ธฐ์กด ํ† ํฐ ์ •๋ณด๋ฅผ ์‚ญ์ œ ํ›„ ์ƒˆ๋กœ์šด ํ† ํฐ ์ •๋ณด๋ฅผ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ €์žฅํ•˜๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. +> +> **d. ์žฌ๋ฐœ๊ธ‰ ์‹œ ๋ชจ๋“  ํ† ํฐ์„ ์ƒˆ๋กœ ๋ฐœ๊ธ‰** +> - ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ ๋˜ํ•œ ์žฌ๋ฐœ๊ธ‰์„ ์ž์ฃผ ๋ฐ›๊ฒŒ ๋œ๋‹ค๋ฉด ๋„คํŠธ์›Œํฌ์— ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๋งŽ์ด ๋…ธ์ถœ๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ํ† ํฐ์„ ์žฌ๋ฐœ๊ธ‰ํ•  ๋•Œ, access token ๋ฐ refresh token ๋‘˜ ๋‹ค ์ƒˆ๋กœ ๋ฐœ๊ธ‰ํ•˜๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. + +### โœ‰๏ธ ์ด๋ฉ”์ผ ๊ฒ€์ฆ +์œ ์ € ์ด๋ฉ”์ผ์ด ์œ ํšจํ•œ์ง€ ๊ฒ€์ฆ์„ ํ•  ํ•„์š”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ, ์œ ์ €๋Š” ์กด์žฌํ•˜์ง€ ์•Š๋Š” ๊ฐ€์ƒ์˜ ์ด๋ฉ”์ผ๋“ค์„ ๋ฌดํ•œ์ • ๋งŒ๋“ค์–ด ๋‚ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•˜์—ฌ ํšŒ์›๊ฐ€์ž…์„ ํ•  ์ด๋ฉ”์ผ๋กœ ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ๋ฐœ์†ก, ํ•ด๋‹น ์ธ์ฆ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•ด์•ผ๋งŒ ๊ฐ€์ž…ํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค๊ณ„ํ–ˆ์Šต๋‹ˆ๋‹ค. + +ํ•˜์ง€๋งŒ ํฌ๋žจํด๋ฆฐ ๋‚ด๋ถ€ ์ •์ฑ…์œผ๋กœ ์ธํ•œ SMTP ํ”„๋กœํ† ์ฝœ ์‚ฌ์šฉ ๋ถˆ๊ฐ€๋กœ ์ด๋ฉ”์ผ ๋ฐœ์†ก์€ ์ œ์™ธํ•˜๊ณ  ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋กœ ๊ฒ€์ฆํ•˜๋„๋ก ๋Œ€์ฒดํ•˜์˜€์Šต๋‹ˆ๋‹ค. + +
+ +### ๐Ÿ’ณ ํ† ์Šค ํŽ˜์ด๋จผ์ธ ์™€ ์—ฐ๊ฒฐ + +> ์ˆœ์ˆ˜ ๋ฉค๋ฒ„์‹ญ ๊ฒฐ์ œ ํ›„ ์œ ์ € ๋“ฑ๊ธ‰ ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ํ•˜๊ธฐ ์œ„ํ•ด ํ† ์Šค ํŽ˜์ด๋จผ์ธ ์™€ ์—ฐ๋™์„ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค. (๊ฒฐ์ œ + ์—…๊ทธ๋ ˆ์ด๋“œ)๋ฅผ atomicํ•˜๊ฒŒ ์ฒ˜๋ฆฌํ•˜์—ฌ **๋ฐ์ดํ„ฐ ๋ฌด๊ฒฐ์„ฑ**์„ ๋ณด์žฅํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์ „์ฒด ๋กœ์ง์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. + +- ๊ฒฐ์ œ ์š”์ฒญ์„ ์œ„ํ•œ ๋ฐ์ดํ„ฐ ์ €์žฅ + - orderId์™€ amount๋ฅผ Payment ํ…Œ์ด๋ธ”์— ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. +- ๊ฒฐ์ œ ์Šน์ธ ์š”์ฒญ ๋ฐ ์—…๊ทธ๋ ˆ์ด๋“œ + 1. ๊ฒ€์ฆ: ์ด์ „์— ์ €์žฅํ•œ ๋ฐ์ดํ„ฐ์™€ ํ˜„์žฌ request๋กœ ๋ฐ›์€ ๋ฐ์ดํ„ฐ ๋น„๊ต + 2. ํ† ์Šค ํŽ˜์ด๋จผ์ธ  ์Šน์ธ์š”์ฒญ: paymentKey, orderId, amount ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ด์•„ ํ† ์ŠคํŽ˜์ด๋จผ์ธ ๋กœ ์Šน์ธ ์š”์ฒญ์„ ๋ณด๋ƒ…๋‹ˆ๋‹ค. + 3. ์Šน์ธ ์š”์ฒญ์— ์„ฑ๊ณตํ•˜๋ฉด ์œ ์ € ๋“ฑ๊ธ‰์„ NORMAL โ†’ PREMIUM์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  ๊ฒฐ์ œ ์‹œ๊ฐ„์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. + +
+ +### โ›” CORS ์„ค์ • +> ๋ฐฑ์—”๋“œ ์„œ๋ฒ„๋กœ ๋“ค์–ด์˜ค๋Š” ๋ชจ๋“  ์š”์ฒญ์— ๋Œ€ํ•ด ์œ„ ์„ค์ •์„ ์ ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. +- `GET`, `POST`, `PUT`, `DELETE` ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์œ„ 4๊ฐ€์ง€ HTTP methods๋ฅผ ํ—ˆ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. +- ๋ฐฐํฌ ํ™˜๊ฒฝ์—์„œ ํ”„๋ก ํŠธ ์—”๋“œ์™€์˜ ํ†ต์‹ ์€ localhost์˜ 3000๋ฒˆ ํฌํŠธ๋ฅผ ํ†ตํ•ด ์ด๋ฃจ์–ด์ง€๊ธฐ ๋•Œ๋ฌธ์— `localhost:3000` ํฌํŠธ๋งŒ์˜ ํ†ต์‹ ๋งŒ ํ—ˆ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค. +- JWT ํ† ํฐ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์•ก์„ธ์Šค ํ† ํฐ์„ ์œ„ํ•œ `Authorization` ํ—ค๋”, ๋ฆฌํ”„๋ ˆ์‹œ ํ† ํฐ์„ ์œ„ํ•œ `Refresh` ํ—ค๋”๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋‘ ํ—ค๋”๋ฅผ ํด๋ผ์ด์–ธํŠธ์—์„œ ์—ด๋žŒ ๊ฐ€๋Šฅํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `Authorization` ํ—ค๋”๋ฅผ ํ†ตํ•ด ์œ ์ € ์ธ์ฆ์„ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— `setAllowCredentials` ์˜ต์…˜์„ `true`๋กœ ํ™œ์„ฑํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค. + +
+ +### โŒ SQLDelete +Untitled (12) + +์ €ํฌ ํ…Œ์ด๋ธ” ๊ตฌ์กฐ๋Š” ๋งค์นญ๋‚ด์—ญ์— ํ”Œ๋ž˜๋„ˆ์™€ ์˜ˆ๋น„ ๋ถ€๋ถ€๊ฐ€ ํ•จ๊ป˜ ๋“ค์–ด๊ฐ€ ์žˆ๋Š” ํ˜•ํƒœ์ž…๋‹ˆ๋‹ค. ์ด ๊ฒฝ์šฐ ์˜ˆ๋น„ ๋ถ€๋ถ€๊ฐ€ ํƒˆํ‡ดํ•˜๋ฉด ์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ๊ฐ€ ๊ฒฌ์ ์„œ ๋“ฑ ์—ฐ๊ด€๋œ ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•  ๋•Œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. ์ €ํฌ๋Š” ํฌํŠธํด๋ฆฌ์˜ค ์กฐํšŒ์—์„œ๋„ ํ”Œ๋ž˜๋„ˆ์˜ ์ด์ „ ๊ฑฐ๋ž˜ ๋‚ด์—ญ์„ ์กฐํšŒํ•˜๊ธฐ ์œ„ํ•ด ๊ฒฌ์ ์„œ ๋‚ด์šฉ์„ ๊ฐ€์ ธ์™€์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— Hard Delete ๋ฅผ ํ•˜๊ฒŒ๋˜๋ฉด ์กฐํšŒ๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. + +์‹ค๋ฌด์—์„  is_active์™€ ๊ฐ™์€ ์ƒํƒœ๊ฐ’์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” ํ•„๋“œ๋ฅผ ๋งŒ๋“ค์–ด SQL Delete๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ๋ฉ˜ํ† ๋‹˜์˜ ์กฐ์–ธ์„ ๋“ฃ๊ณ  ์œ ์ €, ๋งค์นญ, ๊ฒฌ์ ์„œ ๋“ฑ์—์„œ ํ™œ์„ฑํ™” ์œ ๋ฌด ๋“ฑ์„ ๊ด€๋ฆฌํ•˜๋„๋ก ํ•˜์˜€์Šต๋‹ˆ๋‹ค. + +๋˜ํ•œ ํฌํŠธํด๋ฆฌ์˜ค๋ฅผ ํ”Œ๋ž˜๋„ˆ๊ฐ€ ์‹ค์ˆ˜๋กœ ์‚ญ์ œํ•˜๊ฑฐ๋‚˜ ๊ฒฌ์ ์„œ ๋“ฑ ์ค‘์š” ๋ฐ์ดํ„ฐ๋ฅผ ์‚ญ์ œํ•  ๊ฒฝ์šฐ ๋‚ด์šฉ์„ ๋‹ค์‹œ ๋ณต๊ตฌํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜์˜€์Šต๋‹ˆ๋‹ค. + +
+ +### โš™๏ธ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ธํŒ… +> ์ €ํฌ github์— ์˜ฌ๋ผ๊ฐ„ ์ฝ”๋“œ๋ฅผ ๋” ์•ˆ์ „ํ•˜๊ฒŒ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋‹ค์Œ ๋‚ด์šฉ์„ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋กœ ๋ถ„๋ฆฌํ•ด์„œ ๊ด€๋ฆฌํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. +> - `EMAIL_TEST_CODE`(์ด๋ฉ”์ผ ์ธ์ฆ ์ฝ”๋“œ) +> - `SENDER`(์ด๋ฉ”์ผ ์ „์†ก ๊ณ„์ • ์ด๋ฉ”์ผ) +> - `GMAIL_PASSWORD`(์ด๋ฉ”์ผ ์ „์†ก ๊ณ„์ • ๋น„๋ฐ€๋ฒˆํ˜ธ) +> - `TOSS_PAYMENT_SECRET`(ํ† ์Šค ํŽ˜์ด๋จผ์ธ  ์‹œํฌ๋ฆฟํ‚ค) +> - `JWT_ACCESS_SECRET`(accessํ† ํฐ ์‹œํฌ๋ฆฟ ํ‚ค) +> - `JWT_REFRESH_SECRET`(refreshํ† ํฐ ์‹œํฌ๋ฆฟํ‚ค) + +
+ +## ์„ฑ๋Šฅ ์ตœ์ ํ™” + +### โšก N๋ฒˆ์˜ Insert Query โ†’ JDBC Batch Update + +์›จ๋”ฉ ํ”Œ๋ž˜๋„ˆ๊ฐ€ ์ž‘์„ฑํ•œ ํฌํŠธํด๋ฆฌ์˜ค์™€ ํฌํŠธํด๋ฆฌ์˜ค์— ํฌํ•จ๋  ์ด๋ฏธ์ง€, ๊ฐ€๊ฒฉ ํ•ญ๋ชฉ & ์˜ˆ๋น„ ๋ถ€๋ถ€๊ฐ€ ์ž‘์„ฑํ•œ ๋ฆฌ๋ทฐ์™€ ๋ฆฌ๋ทฐ์— ํฌํ•จ๋  ์ด๋ฏธ์ง€ ํ•ญ๋ชฉ์—๋Š” ์„œ๋กœ 1๋Œ€ N์˜ ๊ด€๊ณ„๊ฐ€ ์„ฑ๋ฆฝํ•ฉ๋‹ˆ๋‹ค. + +๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ํฌํŠธํด๋ฆฌ์˜ค ๋“ฑ๋ก ์ƒํ™ฉ์ด ๋ฐœ์ƒํ•˜๋ฉด ์„œ๋ฒ„์—์„œ๋Š” DB์˜ โ€˜ํฌํŠธํด๋ฆฌ์˜คโ€™ ํ…Œ์ด๋ธ”๊ณผ โ€˜ํฌํŠธํด๋ฆฌ์˜ค ์ด๋ฏธ์ง€โ€™ ํ…Œ์ด๋ธ”, โ€˜ํฌํŠธํด๋ฆฌ์˜ค ๊ฐ€๊ฒฉโ€™ ํ…Œ์ด๋ธ”์— ์ ‘๊ทผํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. + +์˜ˆ๋ฅผ ๋“ค์–ด, ์‚ฌ์šฉ์ž๊ฐ€ ํฌํŠธํด๋ฆฌ์˜ค๋ฅผ ๋“ฑ๋กํ•  ๋•Œ ์ด๋ฏธ์ง€ 4๊ฐœ, ๊ฐ€๊ฒฉ ํ•ญ๋ชฉ 3๊ฐœ๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด โ€˜ํฌํŠธํด๋ฆฌ์˜คโ€™ ํ…Œ์ด๋ธ”์— 1๊ฐœ์˜ ๋ ˆ์ฝ”๋“œ, โ€˜ํฌํŠธํด๋ฆฌ์˜ค ์ด๋ฏธ์ง€โ€™ ํ…Œ์ด๋ธ”์— 4๊ฐœ์˜ ๋ ˆ์ฝ”๋“œ, โ€˜ํฌํŠธํด๋ฆฌ์˜ค ๊ฐ€๊ฒฉโ€™ ํ…Œ์ด๋ธ”์— 3๊ฐœ์˜ ๋ ˆ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. + +**(1) JPA** + +ํ•˜์ง€๋งŒ ์ด ๋™์ž‘์„ JPA๋กœ ์ˆ˜ํ–‰ํ•˜๋ฉด ์ด 8๊ฐœ์˜ INSERT Query๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค. + +```sql +INSERT INTO portfolio_tb VALUES (?,?,?,default); +INSERT INTO portfolio_imageitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_imageitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_imageitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_imageitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_priceitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_priceitem_tb VALUES (?,?,?,default); +INSERT INTO portfolio_priceitem_tb VALUES (?,?,?,default); +``` + + +์™œ๋ƒํ•˜๋ฉด JPA๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ Batch Insert๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. + +```sql +spring.jpa.properties.hibernate.order_inserts=true +spring.jpa.properties.hibernate.order_updates=true +spring.jpa.properties.hibernate.jdbc.batch_size=50 +``` + +> ํ•˜์ง€๋งŒ ์œ„์™€ ๊ฐ™์ด Spring ์„ค์ • ๊ฐ’๋“ค์„ ๋ณ€๊ฒฝํ•ด์ฃผ์–ด๋„ ์—ฌ์ „ํžˆ ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. +> +> ๊ทธ ์ด์œ ๋Š” ๋‹ค์Œ Hibernate์˜ [๊ณต์‹ ๋ฌธ์„œ](https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#batch-session-batch-insert)์—๋„ ๋‚˜์™€์žˆ๋Š” ๊ฒƒ์ฒ˜๋Ÿผ JPA Entity์—์„œ Primary Key์˜ GenerationType์„ IDENTITY๋กœ ์„ค์ •ํ•  ๊ฒฝ์šฐ์— Hibernate๊ฐ€ JDBC batch๋ฅผ ๋น„ํ™œ์„ฑํ™”์‹œ์ผœ ๋ฒ„๋ฆฌ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. +> +> ๊ทธ ์ด์œ ๋Š” ์ƒˆ๋กœ ํ• ๋‹นํ•  Key ๊ฐ’์„ ๋ฏธ๋ฆฌ ์•Œ ์ˆ˜ ์—†๋Š” IDENTITY ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ๋•Œ Batch Support๋ฅผ ์ง€์›ํ•˜๋ฉด Hibernate๊ฐ€ ์ฑ„ํƒํ•œ flush ๋ฐฉ์‹์ธ โ€˜Transactional Write Behindโ€™์™€ ์ถฉ๋Œ์ด ๋ฐœ์ƒํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. +> +> ๋”ฐ๋ผ์„œ ๊ฐ€์žฅ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” IDENTITY ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๋ฉด Batch Insert๋Š” ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. + +--- + +**(2) JDBC Template** + +๊ทธ๋ ‡๋‹ค๊ณ  ๋‹ค์–‘ํ•œ ์ด์ ์ด ์žˆ๋Š” IDENTITY ๋ฐฉ์‹์„ ๋ณ€๊ฒฝํ•  ์ˆ˜๋Š” ์—†๊ธฐ ๋•Œ๋ฌธ์— JdbcTemplate์—์„œ Batch๋ฅผ ์ง€์›ํ•˜๋Š” `batchUpdate` ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ๋กœ ํ–ˆ์Šต๋‹ˆ๋‹ค. + +```sql +@Repository +public class PortfolioImageItemJDBCRepositoryImpl implements PortfolioImageItemJDBCRepository { + + private final JdbcTemplate jdbcTemplate; + + ... + jdbcTemplate.batchUpdate(sql, portfolioImageItems, portfolioImageItems.size(), pss); + + ... +``` + +์œ„์™€ ๊ฐ™์ด `batchUpdate`๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด Multi Value ํ˜•ํƒœ๋กœ ์ž‘์„ฑ๋œ SQL Batch Insert๋ฌธ์„ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +```prolog +o.s.jdbc.core.JdbcTemplate : Executing SQL batch update [INSERT INTO portfolio_imageitem_tb ... ] +o.s.jdbc.core.JdbcTemplate : Executing prepared SQL statement [INSERT INTO portfolio_imageitem_tb ... ] +... +o.s.jdbc.core.JdbcTemplate : Executing SQL batch update [INSERT INTO portfolio_priceitem_tb ... ] +o.s.jdbc.core.JdbcTemplate : Executing prepared SQL statement [INSERT INTO portfolio_priceitem_tb ... ] +``` + +๊ฒฐ๊ณผ์ ์œผ๋กœ Batch Insert๋ฌธ์„ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋ฉด ํ…Œ์ด๋ธ”๋งˆ๋‹ค ํ•˜๋‚˜์”ฉ ์ด 3๊ฐœ์˜ ์ฟผ๋ฆฌ๊ฐ€ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. + +--- + +(3) ๐Ÿณ๏ธ ๊ฒฐ๋ก  + +๊ตฌํ˜„ ํ›„ ํ…Œ์ŠคํŠธ๋ฅผ ํ•ด๋ณด์•˜์„ ๋•Œ, + +Batch Insert๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  JPA๋กœ **1๋งŒ ๊ฑด์˜ ๋ฐ์ดํ„ฐ**๋ฅผ ์‚ฝ์ž…ํ–ˆ์„ ๋•Œ ์•ฝ 30์ดˆ(31263ms)์˜ ์‹œ๊ฐ„์ด ์†Œ์š”๋˜์—ˆ์ง€๋งŒ, + +Batch Insert๋ฅผ ์‚ฌ์šฉํ•˜๋‹ˆ 935ms๋กœ ์ˆ˜ํ–‰ ์‹œ๊ฐ„์ด ๋ถˆ๊ณผ 1์ดˆ๋„ ๋˜์ง€ ์•Š๋Š” ํผํฌ๋จผ์Šค๋ฅผ ๋ณด์—ฌ์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค. **์•ฝ 30๋ฐฐ ์ด์ƒ์˜ ์—„์ฒญ๋‚œ ์„ฑ๋Šฅ ์ฐจ์ด**๋ฅผ ๋ณด์ด๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. + +JDBC batchUpdate๋Š” ์ˆ˜์ •(Update) ์š”์ฒญ ์‹œ์—๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ ์šฉํ•˜์˜€์œผ๋ฉฐ, + +์ด๋ฅผ ํ†ตํ•ด, ์„œ๋น„์Šค ๊ณผ์ •์—์„œ ํ•œ๊บผ๋ฒˆ์— ์š”์ฒญ ๋ฐ›๋Š” ๋ฐ์ดํ„ฐ์˜ ํ•ญ๋ชฉ ์ˆ˜๊ฐ€ ๋Š˜์–ด๋‚˜๋„ ์•ˆ์ •์ ์ธ Response ์‹œ๊ฐ„์„ ํ™•๋ณดํ•˜๋ฉฐ ํšจ๊ณผ์ ์œผ๋กœ ์ž˜ ๋Œ€์ฒ˜ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์œผ๋กœ ๊ธฐ๋Œ€ํ•ฉ๋‹ˆ๋‹ค.
+### โ˜๏ธ ์ธ๋ฑ์Šค + +> ์ €ํฌ ํ”„๋กœ์ ํŠธ์˜ ๊ถ๊ทน์ ์ธ ๋ชฉ์ ์€ ์ •๋ณด ๊ณต์œ ์— ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์ด์šฉํ•ด์„œ ํ•ฉ๋ฆฌ์ ์ธ ์˜์‚ฌ๊ฒฐ์ •์„ ๋‚ด๋ฆฌ๋Š” ๊ฒƒ์— ์ดˆ์ ์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ์‚ฝ์ž… ๋ฐ ์ˆ˜์ •์— ๋น„ํ•ด ์กฐํšŒ ์š”์ฒญ์˜ ๋น„์œจ์ด ์••๋„์ ์œผ๋กœ ๋†’์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์กฐํšŒ ์„ฑ๋Šฅ์„ ๋†’์ด๊ธฐ ์œ„ํ•ด ํ…Œ์ด๋ธ”์— ์ธ๋ฑ์Šค๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. + +- `user_tb` : ์œ ์ € ํ…Œ์ด๋ธ”์˜ ๊ฒฝ์šฐ, ๊ฐ€์žฅ ๋นˆ๋ฒˆํ•˜๊ฒŒ ๋ฐœ์ƒํ•˜๋Š” ์กฐํšŒ ์ฟผ๋ฆฌ๋Š” ์œ ์ € ์ธ์ฆ ์‹œ์— ๋ฐœ์ƒํ•˜๋Š” email์„ ํ†ตํ•œ ์—”ํ‹ฐํ‹ฐ ์กฐํšŒ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ email ์ธ๋ฑ์Šค๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `token_tb` : ํ† ํฐ์€ ์œ ์ € ์•„์ด๋””์— ํ•ด๋‹นํ•˜๋Š” ํ† ํฐ์„ ์กฐํšŒํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์ „๋ถ€์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ธ๋ฑ์Šค๋กœ user_id๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `email_code_tb` : ์ด๋ฉ”์ผ ์ธ์ฆ์ฝ”๋“œ์˜ ๊ฒฝ์šฐ, ์ด๋ฉ”์ผ๋กœ ์กฐํšŒํ•˜๋Š” ๊ฒฝ์šฐ ๋ฟ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ email์„ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `quotation_tb` : match_id ํ˜น์€ ์œ ์ € ์•„์ด๋””๋กœ ์กฐํšŒํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋Œ€๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ match_id๋ฅผ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. ์œ ์ € ์•„์ด๋””๋กœ์˜ ์กฐํšŒ๋Š” Match ํ…Œ์ด๋ธ”์ด๋ฏ€๋กœ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. +- `portfolio_tb` : ๋Œ€๋ถ€๋ถ„์˜ ๊ฒฝ์šฐ๊ฐ€ ํ”Œ๋ž˜๋„ˆ๋ฅผ ์ด์šฉํ•œ ์กฐํšŒ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ planner_id๋ฅผ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `portfolio_price_item_tb` , `portfolio_image_item_tb` : ํฌํŠธํด๋ฆฌ์˜ค๋ฅผ ํ†ตํ•œ ์กฐํšŒ๊ฐ€ ์ „๋ถ€์ด๊ธฐ ๋•Œ๋ฌธ๋ฐ, portoflio_id๋ฅผ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `payment_tb` : ์œ ์ € ์•„์ด๋””๋ฅผ ์ด์šฉํ•œ ์กฐํšŒ๊ฐ€ ์ „๋ถ€์ด๊ธฐ ๋•Œ๋ฌธ์— user_id๋ฅผ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `match_tb` : ํ”Œ๋ž˜๋„ˆ, ์ปคํ”Œ, ํ”Œ๋ž˜๋„ˆ์™€ ์ปคํ”Œ 3๊ฐ€์ง€ ๊ฒฝ์šฐ๋กœ ์กฐํšŒ๋ฅผ ์‹œ๋„ํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ couple์„ ์ด์šฉํ•œ ์กฐํšŒ๊ฐ€ ๋Œ€๋‹ค์ˆ˜ ์ด๊ณ , ๋งค์นญ๋‚ด์—ญ ์ƒ์„ฑ์„ ์œ„ํ•œ ํ”Œ๋ž˜๋„ˆ์™€ ์ปคํ”Œ ๋ชจ๋‘๋ฅผ ์‚ฌ์šฉํ•œ ์กฐํšŒ๊ฐ€ ๋‹ค์Œ์ž…๋‹ˆ๋‹ค. ํ”Œ๋ž˜๋„ˆ๋งŒ์„ ์ด์šฉํ•œ ์กฐํšŒ๋Š” ๋นˆ๋ฒˆํ•˜๊ฒŒ ๋ฐœ์ƒํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ planner_id์™€ couple_id๋ฅผ ๋ณตํ•ฉํ‚ค๋กœ ์ธ๋ฑ์Šค ์„ค์ •์„ ํ•˜๊ณ , couple_id๋ฅผ ์•ž์— ๋ฐฐ์น˜ํ•˜์˜€์Šต๋‹ˆ๋‹ค. +- `favorite_tb` : ์œ ์ € ์•„์ด๋””๋ฅผ ์ด์šฉํ•œ ์กฐํšŒ๊ฐ€ ์ „๋ถ€์ž…๋‹ˆ๋‹ค. ํฌํŠธํด๋ฆฌ์˜ค๋„ ํ•„์š”ํ•œ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์ง€๋งŒ, ์œ ์ € ์•„์ด๋””๋งŒ ์ด์šฉํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์••๋„์ ์ด๋ผ๊ณ  ํŒ๋‹จ๋˜์–ด user_id๋งŒ ์ธ๋ฑ์Šค๋กœ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค. +- `chat_tb` : ์ฑ„ํŒ… ํ…Œ์ด๋ธ”์€ ๋‹ค๋ฅธ ํ…Œ์ด๋ธ”์—์„œ joinํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋Œ€๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. ๊ทธ๋ ‡๊ธฐ์— id๋งŒ์œผ๋กœ ์ถฉ๋ถ„ํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ์ถ”๊ฐ€์ ์ธ ์ธ๋ฑ์Šค๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. + + ## License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git "a/sunsu-wedding/docs/\352\262\260\355\230\274\354\244\200\353\271\204 \354\233\271\354\202\254\354\235\264\355\212\270 Survey.pdf" "b/sunsu-wedding/docs/\352\262\260\355\230\274\354\244\200\353\271\204 \354\233\271\354\202\254\354\235\264\355\212\270 Survey.pdf" new file mode 100644 index 0000000..5a55851 Binary files /dev/null and "b/sunsu-wedding/docs/\352\262\260\355\230\274\354\244\200\353\271\204 \354\233\271\354\202\254\354\235\264\355\212\270 Survey.pdf" differ diff --git "a/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\352\270\260\355\232\215\354\225\210\353\260\234\355\221\234.pdf" "b/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\352\270\260\355\232\215\354\225\210\353\260\234\355\221\234.pdf" new file mode 100644 index 0000000..f31635c Binary files /dev/null and "b/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\352\270\260\355\232\215\354\225\210\353\260\234\355\221\234.pdf" differ diff --git "a/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\354\265\234\354\242\205\353\260\234\355\221\234.pptx" "b/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\354\265\234\354\242\205\353\260\234\355\221\234.pptx" new file mode 100644 index 0000000..d2d93a2 Binary files /dev/null and "b/sunsu-wedding/docs/\354\210\234\354\210\230\354\233\250\353\224\251-\354\265\234\354\242\205\353\260\234\355\221\234.pptx" differ diff --git "a/sunsu-wedding/docs/\354\213\234\354\227\260\354\230\201\354\203\201-\355\216\270\354\247\221\353\263\270.mp4" "b/sunsu-wedding/docs/\354\213\234\354\227\260\354\230\201\354\203\201-\355\216\270\354\247\221\353\263\270.mp4" new file mode 100644 index 0000000..c09d16f Binary files /dev/null and "b/sunsu-wedding/docs/\354\213\234\354\227\260\354\230\201\354\203\201-\355\216\270\354\247\221\353\263\270.mp4" differ diff --git "a/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \352\262\260\352\263\274 \353\263\264\352\263\240\354\204\234(BE).pdf" "b/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \352\262\260\352\263\274 \353\263\264\352\263\240\354\204\234(BE).pdf" new file mode 100644 index 0000000..1691d34 Binary files /dev/null and "b/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \352\262\260\352\263\274 \353\263\264\352\263\240\354\204\234(BE).pdf" differ diff --git "a/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \354\213\234\353\202\230\353\246\254\354\230\244 \353\263\264\352\263\240\354\204\234(BE).pdf" "b/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \354\213\234\353\202\230\353\246\254\354\230\244 \353\263\264\352\263\240\354\204\234(BE).pdf" new file mode 100644 index 0000000..e221b08 Binary files /dev/null and "b/sunsu-wedding/docs/\355\205\214\354\212\244\355\212\270 \354\213\234\353\202\230\353\246\254\354\230\244 \353\263\264\352\263\240\354\204\234(BE).pdf" differ