Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿš€ 2๋‹จ๊ณ„ - ๋ชจ๋ธ๋ง ํ•˜๊ธฐ #469

Open
wants to merge 13 commits into
base: hoon25
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
7e2d833
docs(๋ชจ๋ธ๋ง): Menu ๋ชจ๋ธ๋ง ์ •๋ฆฌ
hoon25 Feb 9, 2025
f71a9bf
docs(๋ชจ๋ธ๋ง): Product ๋ชจ๋ธ๋ง ์ •๋ฆฌ
hoon25 Feb 10, 2025
627909e
docs(๋ชจ๋ธ๋ง): MenuGroup ๋ชจ๋ธ๋ง ์ •๋ฆฌ
hoon25 Feb 10, 2025
e8c2691
docs(๋ชจ๋ธ๋ง): OrderTable ๋ชจ๋ธ๋ง ์ •๋ฆฌ
hoon25 Feb 10, 2025
ab62f19
docs(๋ชจ๋ธ๋ง): Order ๋ชจ๋ธ๋ง ์ •๋ฆฌ
hoon25 Feb 10, 2025
2f07cc3
docs(๋ชจ๋ธ๋ง): OrderStatus ํ๋ฆ„ Diagram ์ถ”๊ฐ€
hoon25 Feb 10, 2025
fef9661
docs(๋ชจ๋ธ๋ง): ์ „์ฒด ๋ชจ๋ธ๋ง ์ถ”๊ฐ€
hoon25 Feb 12, 2025
9f2ec18
remove: unused picture
hoon25 Feb 12, 2025
de38685
docs(๋ชจ๋ธ๋ง): ์šฉ์–ด์— ๋ฐฑํ‹ฑ ์ถ”๊ฐ€
hoon25 Feb 14, 2025
ee73b46
docs(๋ชจ๋ธ๋ง): ๋ˆ„๋ฝ๋œ ์š”๊ตฌ์‚ฌํ•ญ๋“ค ๋ชจ๋ธ๋ง์— ์ถ”๊ฐ€
hoon25 Feb 14, 2025
be5dbad
docs(๋ชจ๋ธ๋ง): rename ์ฃผ๋ฌธ์ ‘์ˆ˜ to ์ฃผ๋ฌธ์ˆ˜๋ฝ
hoon25 Feb 14, 2025
b3dc986
docs(๋ชจ๋ธ๋ง): Order๊ฐ€ DeliveryAgency ํ˜ธ์ถœ ์‹œ ์ œ๊ณตํ•ด์•ผํ•˜๋Š” ์ •๋ณด ์ถ”๊ฐ€
hoon25 Feb 14, 2025
83aac6f
docs(๋ชจ๋ธ๋ง): ๋น„์†์–ด ๊ด€๋ จ ์šฉ์–ด ์ •๋ฆฌ
hoon25 Feb 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed OrderStatus_Diagram.png
Binary file not shown.
105 changes: 77 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,34 +124,83 @@ docker compose -p kitchenpos up -d

## ์šฉ์–ด ์‚ฌ์ „

| ํ•œ๊ธ€๋ช… | ์˜๋ฌธ๋ช… | ์„ค๋ช… |
|-------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ์ƒํ’ˆ | Product | ๋ฉ”๋‰ด์— ์†ํ•ด์žˆ๋Š” ํŒ๋งค๋‹จ์œ„ ex)์–‘๋…์น˜ํ‚จ |
| ๋ฉ”๋‰ด ๊ทธ๋ฃน | Menu Group | ๋ฉ”๋‰ด์˜ ์ƒ์œ„๊ฐœ๋…์œผ๋กœ ๋น„์Šทํ•œ ๋ฉ”๋‰ด๋“ค๋ผ๋ฆฌ ๋ฌถ์—ฌ์žˆ๋‹ค ex)์ถ”์ฒœ๋ฉ”๋‰ด |
| ๋ฉ”๋‰ด | Menu | ์†๋‹˜์ด ์ฃผ๋ฌธํ•˜๋Š” ๋‹จ์œ„ ex)์น˜ํ‚จ ๋‘๋งˆ๋ฆฌ ์„ธํŠธ |
| ๋ฉ”๋‰ด ์ƒํ’ˆ | Menu Product | ๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ |
| ๋ฉ”๋‰ด์ƒํ’ˆ๊ฐ€๊ฒฉ ํ•ฉ | Total Menu Product Price | ๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ๋“ค์˜ ๊ฐ€๊ฒฉ๊ณผ ์ˆ˜๋Ÿ‰์„ ๊ณฑํ•œ ๊ฐ’ (๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ์˜ (๊ฐ€๊ฒฉ * ์ˆ˜๋Ÿ‰)) |
| ๋ฉ”๋‰ด ๊ฐ€๊ฒฉ | Menu Price | ๋ฉ”๋‰ด๋ฅผ ํŒ๋งคํ•˜๋Š” ๊ฐ€๊ฒฉ |
| ๋…ธ์ถœ ๋ฉ”๋‰ด | Displayed Menu | ์†๋‹˜์—๊ฒŒ ๋ณด์ด๋Š” ๋ฉ”๋‰ด |
| ๋น„๋…ธ์ถœ ๋ฉ”๋‰ด | Not Displayed Menu | ์†๋‹˜์—๊ฒŒ ๋ณด์ด์ง€ ์•Š๋Š” ๋ฉ”๋‰ด |
| ์ฃผ๋ฌธ ํ…Œ์ด๋ธ” | Order Table | ์ฃผ๋ฌธ์„ ์ž…๋ ฅํ•˜๋Š” ํ…Œ์ด๋ธ” (ํ˜„์žฌ๋Š” ํ™€์ฃผ๋ฌธ๋งŒ ์ œ๊ณต) |
| ๋น„์ ์œ  ํ…Œ์ด๋ธ” | Not Occupied Table | ์†๋‹˜์ด ๋งค์žฅ์˜ ํ…Œ์ด๋ธ”์—์„œ ๋‚˜๊ฐ”๋‹ค |
| ์ ์œ  ํ…Œ์ด๋ธ” | Occupied Table | ์†๋‹˜์ด ๋งค์žฅ์˜ ํ…Œ์ด๋ธ”์— ์•‰์•˜๋‹ค |
| ์†๋‹˜ | Guest | ์ฃผ๋ฌธ์„ ํ•˜๋Š” ์‚ฌ๋žŒ |
| ์†๋‹˜ ์ˆ˜ | Number Of Guest | ํ…Œ์ด๋ธ”์— ์•‰์€ ์‚ฌ๋žŒ์˜ ์ˆ˜ |
| ๋ฐฐ๋‹ฌ์ฃผ๋ฌธ | Delivery Order | ๋ฐฐ๋‹ฌ๋กœ ์ฃผ๋ฌธํ•œ๋‹ค |
| ํฌ์žฅ์ฃผ๋ฌธ | TakeOut Order | ๋ฐฉ๋ฌธํ•ด์„œ ํฌ์žฅํ•œ๋‹ค |
| ํ™€์ฃผ๋ฌธ | EatIn Order | ๋งค์žฅ ๋‚ด๋ถ€์—์„œ ๋จน๊ณ ๊ฐ„๋‹ค |
| ์ฃผ๋ฌธ ์œ ํ˜• | Order Type | ์ฃผ๋ฌธ๋ฐฉ์‹์˜ ์ข…๋ฅ˜๋“ค (๋ฐฐ๋‹ฌ/ํฌ์žฅ/ํ™€) |
| ๋ฐฐ๋‹ฌ ๋Œ€ํ–‰์‚ฌ | Delivery Agency | ๋ฐฐ๋‹ฌ์„ ๋Œ€ํ–‰ํ•ด์ฃผ๋Š” ์—…์ฒด |
| ์ฃผ๋ฌธ ์ƒํƒœ | Order Status | ์ฃผ๋ฌธ์˜ ์ง„ํ–‰ ํ˜„ํ™ฉ (์ฃผ๋ฌธ๋Œ€๊ธฐ/์ฃผ๋ฌธ์ ‘์ˆ˜/์ฃผ๋ฌธ์„œ๋น™/๋ฐฐ๋‹ฌ์ค‘/๋ฐฐ๋‹ฌ์™„๋ฃŒ/์™„๋ฃŒ)<br/><br/> ๋ฐฐ๋‹ฌ์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ๋ฐฐ๋‹ฌ์ค‘ -> ๋ฐฐ๋‹ฌ์™„๋ฃŒ -> ์™„๋ฃŒ) <br/>ํ™€์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ์™„๋ฃŒ) <br/>ํฌ์žฅ์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ์™„๋ฃŒ) |
| ์ฃผ๋ฌธ๋Œ€๊ธฐ | Waiting | ๋งค์žฅ์ด ์ฃผ๋ฌธ์„ ์ ‘์ˆ˜ํ•œ ์ƒํƒœ |
| ์ฃผ๋ฌธ์„œ๋น™ | Served | ๋งค์žฅ์ด ์ฃผ๋ฌธ์„ ์™„์„ฑํ•œ ์ƒํƒœ |
| ๋ฐฐ๋‹ฌ์ค‘ | Delivering | ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ๋ฐฐ๋‹ฌ์„ ์ง„ํ–‰์ค‘์ธ ์ƒํƒœ |
| ๋ฐฐ๋‹ฌ์™„๋ฃŒ | Delivered | ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ๋ฐฐ๋‹ฌ์„ ์™„๋ฃŒํ•œ ์ƒํƒœ |
| ์™„๋ฃŒ | Complete | ์ฃผ๋ฌธ์˜ ์ง„ํ–‰์ด ๋๋‚œ ์ตœ์ข…์ƒํƒœ |
| ํ•œ๊ธ€๋ช… | ์˜๋ฌธ๋ช… | ์„ค๋ช… |
|---------|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ์ƒํ’ˆ | Product | ๋ฉ”๋‰ด์— ์†ํ•ด์žˆ๋Š” ํŒ๋งค๋‹จ์œ„ ex)์–‘๋…์น˜ํ‚จ |
| ๋ฉ”๋‰ด ๊ทธ๋ฃน | Menu Group | ๋ฉ”๋‰ด์˜ ์ƒ์œ„๊ฐœ๋…์œผ๋กœ ๋น„์Šทํ•œ ๋ฉ”๋‰ด๋“ค๋ผ๋ฆฌ ๋ฌถ์—ฌ์žˆ๋‹ค ex)์ถ”์ฒœ๋ฉ”๋‰ด |
| ๋ฉ”๋‰ด | Menu | ์†๋‹˜์ด ์ฃผ๋ฌธํ•˜๋Š” ๋‹จ์œ„ ex)์น˜ํ‚จ ๋‘๋งˆ๋ฆฌ ์„ธํŠธ |
| ๋ฉ”๋‰ด ์ƒํ’ˆ | Menu Product | ๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ |
| ๋ฉ”๋‰ด์ƒํ’ˆ๊ฐ€๊ฒฉ ํ•ฉ | Total Menu Product Price | ๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ๋“ค์˜ ๊ฐ€๊ฒฉ๊ณผ ์ˆ˜๋Ÿ‰์„ ๊ณฑํ•œ ๊ฐ’ (๋ฉ”๋‰ด์— ์†ํ•œ ์ƒํ’ˆ์˜ (๊ฐ€๊ฒฉ * ์ˆ˜๋Ÿ‰)) |
| ๋ฉ”๋‰ด ๊ฐ€๊ฒฉ | Menu Price | ๋ฉ”๋‰ด๋ฅผ ํŒ๋งคํ•˜๋Š” ๊ฐ€๊ฒฉ |
| ๋…ธ์ถœ ๋ฉ”๋‰ด | Displayed Menu | ์†๋‹˜์—๊ฒŒ ๋ณด์ด๋Š” ๋ฉ”๋‰ด |
| ๋น„๋…ธ์ถœ ๋ฉ”๋‰ด | Not Displayed Menu | ์†๋‹˜์—๊ฒŒ ๋ณด์ด์ง€ ์•Š๋Š” ๋ฉ”๋‰ด |
| ์ฃผ๋ฌธ ํ…Œ์ด๋ธ” | Order Table | ์ฃผ๋ฌธ์„ ์ž…๋ ฅํ•˜๋Š” ํ…Œ์ด๋ธ” (ํ˜„์žฌ๋Š” ํ™€์ฃผ๋ฌธ๋งŒ ์ œ๊ณต) |
| ๋น„์ ์œ  ํ…Œ์ด๋ธ” | Not Occupied Table | ์†๋‹˜์ด ๋งค์žฅ์˜ ํ…Œ์ด๋ธ”์—์„œ ๋‚˜๊ฐ”๋‹ค |
| ์ ์œ  ํ…Œ์ด๋ธ” | Occupied Table | ์†๋‹˜์ด ๋งค์žฅ์˜ ํ…Œ์ด๋ธ”์— ์•‰์•˜๋‹ค |
| ์†๋‹˜ | Guest | ์ฃผ๋ฌธ์„ ํ•˜๋Š” ์‚ฌ๋žŒ |
| ์†๋‹˜ ์ˆ˜ | Number Of Guest | ํ…Œ์ด๋ธ”์— ์•‰์€ ์‚ฌ๋žŒ์˜ ์ˆ˜ |
| ๋ฐฐ๋‹ฌ์ฃผ๋ฌธ | Delivery Order | ๋ฐฐ๋‹ฌ๋กœ ์ฃผ๋ฌธํ•œ๋‹ค |
| ํฌ์žฅ์ฃผ๋ฌธ | TakeOut Order | ๋ฐฉ๋ฌธํ•ด์„œ ํฌ์žฅํ•œ๋‹ค |
| ํ™€์ฃผ๋ฌธ | EatIn Order | ๋งค์žฅ ๋‚ด๋ถ€์—์„œ ๋จน๊ณ ๊ฐ„๋‹ค |
| ์ฃผ๋ฌธ ์œ ํ˜• | Order Type | ์ฃผ๋ฌธ๋ฐฉ์‹์˜ ์ข…๋ฅ˜๋“ค (๋ฐฐ๋‹ฌ/ํฌ์žฅ/ํ™€) |
| ๋ฐฐ๋‹ฌ ๋Œ€ํ–‰์‚ฌ | Delivery Agency | ๋ฐฐ๋‹ฌ์„ ๋Œ€ํ–‰ํ•ด์ฃผ๋Š” ์—…์ฒด |
| ์ฃผ๋ฌธ ์ƒํƒœ | Order Status | ์ฃผ๋ฌธ์˜ ์ง„ํ–‰ ํ˜„ํ™ฉ (์ฃผ๋ฌธ๋Œ€๊ธฐ/์ฃผ๋ฌธ์ ‘์ˆ˜/์ฃผ๋ฌธ์„œ๋น™/๋ฐฐ๋‹ฌ์ค‘/๋ฐฐ๋‹ฌ์™„๋ฃŒ/์™„๋ฃŒ)<br/><br/> ๋ฐฐ๋‹ฌ์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ๋ฐฐ๋‹ฌ์ค‘ -> ๋ฐฐ๋‹ฌ์™„๋ฃŒ -> ์™„๋ฃŒ) <br/>ํ™€์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ์™„๋ฃŒ) <br/>ํฌ์žฅ์ฃผ๋ฌธ (์ฃผ๋ฌธ๋Œ€๊ธฐ -> ์ฃผ๋ฌธ์ ‘์ˆ˜ -> ์ฃผ๋ฌธ์„œ๋น™ -> ์™„๋ฃŒ) |
| ์ฃผ๋ฌธ๋Œ€๊ธฐ | Waiting | ๊ณ ๊ฐ์ด ์ฃผ๋ฌธ์„ ์ƒ์„ฑํ•œ ์ƒํƒœ |
| ์ฃผ๋ฌธ์ ‘์ˆ˜ | Accepted | ๋งค์žฅ์ด ์ฃผ๋ฌธ์„ ์ ‘์ˆ˜ํ•œ ์ƒํƒœ |
| ์ฃผ๋ฌธ์„œ๋น™ | Served | ๋งค์žฅ์ด ์ฃผ๋ฌธ์„ ์™„์„ฑํ•œ ์ƒํƒœ |
| ๋ฐฐ๋‹ฌ์ค‘ | Delivering | ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ๋ฐฐ๋‹ฌ์„ ์ง„ํ–‰์ค‘์ธ ์ƒํƒœ |
| ๋ฐฐ๋‹ฌ์™„๋ฃŒ | Delivered | ์ฃผ๋ฌธ์— ๋Œ€ํ•œ ๋ฐฐ๋‹ฌ์„ ์™„๋ฃŒํ•œ ์ƒํƒœ |
| ์™„๋ฃŒ | Complete | ์ฃผ๋ฌธ์˜ ์ง„ํ–‰์ด ๋๋‚œ ์ตœ์ข…์ƒํƒœ |

## ๋ชจ๋ธ๋ง

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ชจ๋ธ๋ง ํ•˜๊ธฐ ์š”๊ตฌ ์‚ฌํ•ญ์— ์•„๋ž˜์™€ ๊ฐ™์€ ๋‚ด์šฉ์ด ์ ํ˜€์žˆ๋Š” ๊ฒƒ ์ฒ˜๋Ÿผ
์ด๋ฒˆ ๋‹จ๊ณ„๋Š” ์ฐฝํ›ˆ๋‹˜์ด ์ด์ „ ๋‹จ๊ณ„์—์„œ ์ž‘์„ฑํ•˜์‹  ์š”๊ตฌ ์‚ฌํ•ญ๊ณผ ์šฉ์–ด ์‚ฌ์ „์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๋ชจ๋ธ๋ง ํ•˜๊ธฐ๋ฏธ์…˜์ด๋ผ
์ด ์œ„์น˜์— ๋ชจ๋ธ๋ง ๋‚ด์šฉ์„ ์ƒˆ๋กœ ์ž‘์„ฑํ•ด ์ฃผ์…”์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„์š”. ๐Ÿ˜…
๋‹ค์‹œ ์ •๋ฆฌํ•ด ์ฃผ์‹œ๋ฉด ๋ณธ๊ฒฉ์ ์œผ๋กœ ๋ฆฌ๋ทฐ ์‹œ์ž‘ํ• ๊ฒŒ์š”!

ํ‚ค์นœํฌ์Šค์˜ ์š”๊ตฌ ์‚ฌํ•ญ๊ณผ ์šฉ์–ด ์‚ฌ์ „์„ ๊ธฐ๋ฐ˜์œผ๋กœ README.md์— ๋ชจ๋ธ๋ง์„ ํ•œ๋‹ค.

์ด๋ฏธ ์•Œ๊ณ ๊ณ„์‹œ๊ฒ ์ง€๋งŒ ๋ชจ๋ธ๋งํ•˜์‹œ๋ฉด์„œ ์ƒˆ๋กญ๊ฒŒ ๋„์ถœ๋˜๊ฑฐ๋‚˜ ๋ณ€๊ฒฝ๋œ ์‚ฌํ•ญ๋“ค์€
๊ธฐ์กด ์š”๊ตฌ ์‚ฌํ•ญ๊ณผ ์šฉ์–ด ์‚ฌ์ „์—๋„ ๊ณ„์†ํ•ด์„œ ๋ฐ˜์˜ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

Copy link

@HackSung HackSung Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฐฝํ›ˆ๋‹˜์ด ์ƒ๊ฐํ•˜์‹œ๊ณ  ๊ณ„์‹œ๋Š” ๋ชจ๋ธ๋ง์ด๋ž€ ๋ฌด์—‡์ธ์ง€ ์ƒ๊ฐ์„ ๋‚˜๋ˆ ์ค„ ์ˆ˜ ์žˆ์œผ์‹ค๊นŒ์š”? ๐Ÿ˜„
๋ชจ๋ธ๋ง์— ๋Œ€ํ•œ ์ œ ์ƒ๊ฐ์„ ๋จผ์ € ๋ง์”€๋“œ๋ฆฌ์ž๋ฉด
์ •์˜๋œ ์š”๊ตฌ์‚ฌํ•ญ๊ณผ ์šฉ์–ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•„์š”ํ•œ ๋„๋ฉ”์ธ ๊ฐ์ฒด์˜ ์†์„ฑ๊ณผ ์ƒํƒœ๋ฅผ ๊ตฌ์„ฑํ•ด ๋ณด๊ณ 
๊ฐ์ฒด ๊ฐ„์˜ ๊ด€๊ณ„์™€ ํ–‰๋™์„ ์ •์˜ํ•ด ๋ณด๋Š” ์ž‘์—…์ด๋ผ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.
๋” ๋‹จ์ˆœํ•˜๊ฒŒ ํ‘œํ˜„ํ•˜์ž๋ฉด ๋น„์ฆˆ๋‹ˆ์Šค ์š”๊ตฌ์‚ฌํ•ญ์„ ์†Œํ”„ํŠธ์›จ์–ด๋กœ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•œ ์ถ”์ƒํ™” ๋ฐ ๊ตฌ์ฒดํ™” ๊ณผ์ • ๊ฐ™์•„์š”.
๊ทธ๋ž˜์„œ ๋ชจ๋ธ๋ง ํ•˜์‹ค ๋•Œ ์‚ฌ์šฉ ์šฉ์–ด๋ฅผ ๋ฏธ์…˜์„ค๋ช… ์˜ˆ์‹œ์— ๋‚˜์™€ ์žˆ๋Š” ํŒจํ„ด์ฒ˜๋Ÿผ ์˜๋ฌธ๋ณ€์ˆ˜๋ช… ํ˜•ํƒœ๋กœ ๋Œ€์ฒดํ•˜๊ฑฐ๋‚˜ ๊ฐ™์ด ์ ์–ด์ฃผ๋ฉด
๊ตฌํ˜„๋‹จ๊ณ„์—์„œ ์ข€ ๋” ํŽธํ•˜๊ฒŒ ์ง„ํ–‰ํ•˜์‹ค ์ˆ˜ ์žˆ์„๊ฑฐ์—์š”.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ชจ๋ธ๋ง ํ•˜๊ธฐ๋ฅผ ์–ด๋–ป๊ฒŒ ์ง„ํ–‰ํ•ด์•ผํ• ์ง€ ๋ฏธ๋ฆฌ ์งˆ๋ฌธ์„ ํ•  ๊ฑธ ๊ทธ๋žฌ๋„ค์š”๐Ÿ˜ข
์ œ๊ฐ€ ์ƒ๊ฐํ•œ ๋ชจ๋ธ๋ง๋„ ๋ฆฌ๋ทฐ์–ด๋‹˜๊ณผ ๋น„์Šทํ•˜๊ฒŒ ํ˜„์‹ค์„ธ๊ณ„์˜ ๋ฌธ์ œ๋ฅผ ์†Œํ”„ํŠธ์›จ์–ด์— ๋งž๊ฒŒ ์ถ”์ƒํ™”๊ณผ์ •์ด๋ผ๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค.

๋ฆฌ๋ทฐ์–ด๋‹˜์ด ์ƒ์„ธํ•˜๊ฒŒ ์ ์–ด์ฃผ์‹  ๋„๋ฉ”์ธ ๊ฐ์ฒด์˜ ์†์„ฑ๊ณผ ์ƒํƒœ, ๊ฐ์ฒด๊ฐ„์˜ ๊ด€๊ณ„์™€ ํ–‰๋™์„ ์ •์˜ ๋ถ€๋ถ„๋„ ์‹ ๊ฒฝ์จ์„œ ์ž‘์„ฑํ•ด๋ณด์•˜์–ด์š”. ์นœ์ ˆํ•œ ์„ค๋ช… ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.๐Ÿ™


### ์ฃผ๋ฌธ์ƒํƒœ ๋‹ค์ด์–ด๊ทธ๋žจ
![OrderStatus_Diagram.png](OrderStatus_Diagram.png)
### Product
- Product๋Š” ์‹๋ณ„์ž์™€ price, name์„ ๊ฐ€์ง„๋‹ค.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์†Œํ•˜์ง€๋งŒ ์ „์ฒด์ ์œผ๋กœ ์šฉ์–ด๋Š” ๋ฐฑํ‹ฑ๋ฌธ์ž(`) ๊ฐ์‹ธ์„œ ์‰ฝ๊ฒŒ ๊ตฌ๋ถ„๋˜์–ด ๋ณด์ด๊ฒŒ ํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.

Suggested change
- Product๋Š” ์‹๋ณ„์ž์™€ price, name์„ ๊ฐ€์ง„๋‹ค.
- `Product`๋Š” ์‹๋ณ„์ž์™€ `price`, `name`์„ ๊ฐ€์ง„๋‹ค.

- Product์˜ name์€ ํ•„์ˆ˜๊ฐ’์ด๊ณ , PurgomalumClient๋ฅผ ํ†ตํ•ด ๋น„์†์–ด๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์€์ง€ ํ™•์ธํ•œ๋‹ค.
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
- Product์˜ price๋ฅผ ๋ณ€๊ฒฝ
- Product๋ฅผ ํฌํ•จํ•œ Menu๋“ค ์ค‘ `MenuPrice <= ProductPrice * MenuProductQuantity`๋ฅผ ๋งŒ์กฑํ•˜์ง€ ๋ชปํ•˜๋Š” Menu๋Š” `Not Displayed`๋œ๋‹ค
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
### MenuGroup
- MenuGroup๋Š” ์‹๋ณ„์ž์™€ name์„ ๊ฐ€์ง„๋‹ค.
- MenuGroup์˜ name์€ ํ•„์ˆ˜๊ฐ’์ด๋‹ค.
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
### Menu
- Menu๋Š” ์‹๋ณ„์ž์™€ MenuGroup, price, name, displayed, MenuProducts๋ฅผ ๊ฐ€์ง„๋‹ค.
- Menu์˜ name์€ ํ•„์ˆ˜๊ฐ’์ด๊ณ , PurgomalumClient๋ฅผ ํ†ตํ•ด ๋น„์†์–ด๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์ง€ ์•Š์€์ง€ ํ™•์ธํ•œ๋‹ค.
- Menu๋Š” 1๊ฐœ์˜ MenuProduct๋ฅผ ๋ฐ˜๋“œ์‹œ ๊ฐ€์ง„๋‹ค
- MenuProduct์˜ quantity๋Š” 0๊ฐœ ์ด์ƒ์ด์–ด์•ผ ํ•œ๋‹ค.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quantitiy์™ธ์—๋„ MenuProduct๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ์†์„ฑ์ด ๋” ์žˆ์ง€ ์•Š์„๊นŒ์š”?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋งคํ•‘ํ…Œ์ด๋ธ” ์„ฑํ–ฅ์„ ๊ฐ€์ง„ ์†์„ฑ๋“ค์— ๋Œ€ํ•ด์„œ๋„ ๋ชจ๋ธ๋ง์— ์ „๋ถ€ ์ถ”๊ฐ€ ์™„๋ฃŒํ–ˆ์–ด์š”!

- Menu ์ƒ์„ฑ
- `MenuPrice <= ProductPrice * MenuProductQuantity`๋ฅผ ๋งŒ์กฑํ•˜์ง€ ๋ชปํ•˜๋ฉด Menu๋Š” ์ƒ์„ฑ๋˜์ง€ ๋ชปํ•œ๋‹ค
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
- Price ๋ณ€๊ฒฝ
- `MenuPrice <= ProductPrice * MenuProductQuantity`๋ฅผ ๋งŒ์กฑํ•˜์ง€ ๋ชปํ•˜๋ฉด price๋Š” ๋ณ€๊ฒฝ๋˜์ง€ ๋ชปํ•œ๋‹ค
### OrderTable
- OrderTable์€ ์‹๋ณ„์ž์™€ name, numberOfGuests, occupied๋ฅผ ๊ฐ€์ง„๋‹ค.
- OrderTable์˜ ์ดˆ๊ธฐ๊ฐ’์€ numberOfGuests๋Š” 0๋ช…, occupied๋Š” Not Occupied์ด๋‹ค.
- OrderTable์˜ name์€ ํ•„์ˆ˜๊ฐ’์ด๋‹ค.
- OrderTable Occupied ๋ณ€๊ฒฝ
- OrderTable์„ Occupiedํ•  ๋•Œ ์ œ์•ฝ์€ ์—†๋‹ค

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ œ์•ฝ์ด ์—†๋Š” ๊ฒƒ์„ ๊ตณ์ด ๋ช…์‹œํ•  ํ•„์š”๊ฐ€ ์žˆ์„๊นŒ์š”? ๐Ÿค”

Copy link
Author

@hoon25 hoon25 Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#469 (comment) ์™€ ๋™์ผํ•˜๊ฒŒ ๋ถ„๋ฆฌํ•ด์„œ ๋‚˜์—ดํ–ˆ์–ด์š”!

- OrderTable์— ์™„๋ฃŒ๋˜์ง€ ์•Š์€ Order๊ฐ€ ์กด์žฌํ•˜๋ฉด NotOccupied ํ•  ์ˆ˜ ์—†๋‹ค
- OrderTable์˜ numberOfGuests ๋ณ€๊ฒฝ
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
- OrderTable์ด Occupied์ผ ๋•Œ๋งŒ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ๋‹ค

### Order
- Order๋Š” ์‹๋ณ„์ž์™€ orderType, orderStatus, orderMenus๋ฅผ ๊ฐ€์ง„๋‹ค.
- EatInOrder๋Š” OrderTable๋ฅผ ๊ฐ€์ง„๋‹ค
- DeliveryOrder๋Š” deliveryAddress๋ฅผ ๊ฐ€์ง„๋‹ค
- TakeOutOrder๋Š” ์กด์žฌํ•œ๋‹ค

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ญ”๊ฐ€ ์‚ด์ง ๋ถ€์ž์—ฐ์Šค๋Ÿฌ์šด ๋ฌธ์žฅ์ฒ˜๋Ÿผ ๋Š๊ปด์ง€๋Š”๋ฐ TakeOutOrder๋ผ๋Š” ์ฃผ๋ฌธ ์œ ํ˜•์ด ์žˆ๋‹ค๋Š” ๊ฑธ ๋‚˜ํƒ€๋‚ด์‹  ๊ฑธ๊นŒ์š”?
๊ทธ๋ ‡๋‹ค๋ฉด OrderType์€ โ—‹, โ—‹, โ—‹ ์ค‘ ํ•˜๋‚˜๋‹ค. ๋ผ๋Š” ์‹์œผ๋กœ ์ „์ฒด๋ฅผ ๋‚˜์—ดํ•ด ์ฃผ๋Š” ๊ฑด ์–ด๋–จ๊นŒ์š”?

Copy link
Author

@hoon25 hoon25 Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋‘๊ฐ€์ง€ ์ƒ๊ฐ์ด ์„ž์—ฌ์„œ ์ €๋ ‡๊ฒŒ ํ‘œํ˜„์ด ๋˜์—ˆ๋„ค์š”๐Ÿ˜ข ๋ถ„๋ฆฌํ•ด์„œ ๋‚˜์—ดํ–ˆ์–ด์š”!


- Order๋ฅผ ์ƒ์„ฑํ•˜๋ฉด Waiting๊ฐ€ ๋œ๋‹ค
- EatInOrder ์ƒ์„ฑ
- EatInOrder๋Š” Occupied์ธ OrderTable์— ๋“ฑ๋กํ•ด์•ผํ•œ๋‹ค
- EatInOrder๋Š” OrderMenus์˜ quantity ์ œ์•ฝ์ด ์—†๋‹ค
- DeliveryOrder ์ƒ์„ฑ
- DeliveryOrder๋Š” OrderMenus์˜ quantity๊ฐ€ 0๊ฐœ ์ด์ƒ์ด์–ด์•ผ ํ•œ๋‹ค
- DeliveryOrder๋Š” deliveryAddress๊ฐ€ ํ•„์ˆ˜๊ฐ’์ด๋‹ค
- TakeOutOrder ์ƒ์„ฑ
- TakeOutOrder๋Š” OrderMenus์˜ quantity๊ฐ€ 0๊ฐœ ์ด์ƒ์ด์–ด์•ผ ํ•œ๋‹ค

- Order๋ฅผ ์ ‘์ˆ˜ํ•˜๋ฉด Accepted๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ ‘์ˆ˜๋ณด๋‹ค๋Š” ์ˆ˜๋ฝ์ด๋ผ๋Š” ํ‘œํ˜„์„ ์‚ฌ์šฉํ•ด๋ณด๋Š” ๊ฒƒ์— ๋Œ€ํ•ด ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์„ธ์š”?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋” ์ง๊ด€์ ์ธ ์šฉ์–ด๋กœ ๋ณด์ด๋„ค์š”!! ๋ฐ˜์˜์™„๋ฃŒํ–ˆ์–ด์š”๐Ÿ‘

- DeliveryOrder๋Š” `DeliveryAgency`๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeliveryAgency๋ฅผ ํ˜ธ์ถœํ• ๋•Œ ์–ด๋–ค ์ •๋ณด๋“ค์„ ๋„˜๊ฒจ์•ผ ํ•˜๋Š”์ง€๋„ ๊ธฐ์ˆ ํ•ด ์ฃผ๋ฉด ์ข€ ๋” ๋ช…ํ™•ํ•ด์ง€์ง€ ์•Š์„๊นŒ์š”?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฐ˜์˜ ์™„๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค!

Copy link
Author

@hoon25 hoon25 Feb 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+) DeliveryAgency์˜ ํ˜ธ์ถœ๋‚ด์šฉ์„ ์ ๋‹ค๋ณด๋‹ˆ ์ƒ๊ธด ๊ถ๊ธˆ์ฆ

๋ฆฌ๋ทฐ์–ด๋‹˜์€ DeliveryAgency์— ํ•„์š”ํ•œ ๊ฐ’๋“ค์„ ์ฐพ๋Š” ์ฑ…์ž„์„ ๋‘ ํด๋ž˜์Šค์ค‘ ์–ด๋””์— ๋‘์‹ค ๊ฒƒ ๊ฐ™๋‚˜์š”?

  • DeliveryAgency์˜ ๊ตฌํ˜„์ฒด
  • DeliveryAgency๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๊ณณ(์ง€๊ธˆ์€ DeliveryService)

์ข€ ๋” ์‹ฌํ”Œํ•˜๊ฒŒ
requestDelivery(UUID orderId) vs requestDelivery(UUID orderId, BigDecimal amount, String deliveryAddress);์˜ ๊ณ ๋ฏผ์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š”.


์ œ ์ƒ๊ฐ์„ ๋จผ์ € ์ ์–ด๋ณด์ž๋ฉด ์ €๋Š” DeliveryAgency์˜ ๊ตฌํ˜„์ฒด์—์„œ ํ•˜๋Š” ๊ฒƒ์ด ์ ์ ˆํ•˜๋‹ค ์ƒ๊ฐํ–ˆ์–ด์š”.

DeliverAgency๊ฐ€ ์—ฌ๋Ÿฌ ์™ธ๋ถ€ ์„œ๋น„์Šค์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ผ๋ฉด ๊ฐ ์™ธ๋ถ€ ์„œ๋น„์Šค๋“ค์ด ์š”๊ตฌํ•˜๋Š” ์ŠคํŽ™์ด ๊ฐ๊ฐ ๋‹ค๋ฅผ ๊ฒƒ์ด๊ณ ,OrderService์—์„œ orderId๋งŒ ๋„˜๊ฒจ์ฃผ๋Š”๊ฒŒ, OrderService์™€ DeliveryAgency์˜ ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ”๊ฒŒ ๋œ๋‹ค๋Š” ์žฅ์ ์ด ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์–ด์š”.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+) DeliveryAgency์˜ ํ˜ธ์ถœ๋‚ด์šฉ์„ ์ ๋‹ค๋ณด๋‹ˆ ์ƒ๊ธด ๊ถ๊ธˆ์ฆ

๋ฆฌ๋ทฐ์–ด๋‹˜์€ DeliveryAgency์— ํ•„์š”ํ•œ ๊ฐ’๋“ค์„ ์ฐพ๋Š” ์ฑ…์ž„์„ ๋‘ ํด๋ž˜์Šค์ค‘ ์–ด๋””์— ๋‘์‹ค ๊ฒƒ ๊ฐ™๋‚˜์š”?

  • DeliveryAgency์˜ ๊ตฌํ˜„์ฒด
  • DeliveryAgency๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๊ณณ(์ง€๊ธˆ์€ DeliveryService)

์ข€ ๋” ์‹ฌํ”Œํ•˜๊ฒŒ requestDelivery(UUID orderId) vs requestDelivery(UUID orderId, BigDecimal amount, String deliveryAddress);์˜ ๊ณ ๋ฏผ์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š”.

์ œ ์ƒ๊ฐ์„ ๋จผ์ € ์ ์–ด๋ณด์ž๋ฉด ์ €๋Š” DeliveryAgency์˜ ๊ตฌํ˜„์ฒด์—์„œ ํ•˜๋Š” ๊ฒƒ์ด ์ ์ ˆํ•˜๋‹ค ์ƒ๊ฐํ–ˆ์–ด์š”.

DeliverAgency๊ฐ€ ์—ฌ๋Ÿฌ ์™ธ๋ถ€ ์„œ๋น„์Šค์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ผ๋ฉด ๊ฐ ์™ธ๋ถ€ ์„œ๋น„์Šค๋“ค์ด ์š”๊ตฌํ•˜๋Š” ์ŠคํŽ™์ด ๊ฐ๊ฐ ๋‹ค๋ฅผ ๊ฒƒ์ด๊ณ ,OrderService์—์„œ orderId๋งŒ ๋„˜๊ฒจ์ฃผ๋Š”๊ฒŒ, OrderService์™€ DeliveryAgency์˜ ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ”๊ฒŒ ๋œ๋‹ค๋Š” ์žฅ์ ์ด ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์–ด์š”.

์˜คํ˜ธ! ํฅ๋ฏธ๋กœ์šด ํ† ๋ก  ์ฃผ์ œ๊ฐ€ ๋  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š”! ๐Ÿ”ฅ
๋จผ์ € ์ฐฝํ›ˆ๋‹˜์˜ ์˜๊ฒฌ์€ ์ถฉ๋ถ„ํžˆ ํƒ€๋‹น์„ฑ ์žˆ๊ณ  ํ•ฉ๋ฆฌ์ ์ด๋ผ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค! ๐Ÿ‘

ํ•˜์ง€๋งŒ ์ €์˜ ๊ฒฝ์šฐ๋Š” ๋‹จ์ผ ์ฑ…์ž„ ์›์น™(SRP)์˜ ๊ด€์ ์—์„œ ๋“ค์—ฌ๋‹ค ๋ณด์•˜์„ ๋•Œ
DeliveryAgency๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๊ณณ์—์„œ ํ•„์š”ํ•œ ๊ฐ’๋“ค์„ ์ฐพ๋Š” ์ฑ…์ž„์„ ๋‘๋Š” ๊ฒƒ์ด ๋” ์ ์ ˆํ•  ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์˜๊ฒฌ์ž…๋‹ˆ๋‹ค.
์ฃผ ์ด์œ ๋Š” DeliveryAgency๋Š” ์™ธ๋ถ€ ๋ฐฐ๋‹ฌ ์„œ๋น„์Šค์— ๋Œ€ํ•œ ๋‹จ์ˆœํ•œ ์ธํ„ฐํŽ˜์ด์Šค ์—ญํ• ์„ ํ•˜๋Š” ๊ฒƒ์— ์ง‘์ค‘ํ•˜๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์„œ์š”.
์™ธ๋ถ€ ์„œ๋น„์Šค ํ˜ธ์ถœ์— ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ง์ ‘ ์กฐํšŒํ•˜๋Š” ๋กœ์ง์„ ํฌํ•จํ•˜๊ฒŒ ๋˜๋ฉด
DeliveryAgency๋Š” ๋ฐฐ๋‹ฌ ์„œ๋น„์Šค ํ˜ธ์ถœ์ด๋ผ๋Š” ๋ณธ์—ฐ์˜ ์ฑ…์ž„ ์™ธ์— ๋ฐ์ดํ„ฐ ์กฐํšŒ๋ผ๋Š” ๋˜ ๋‹ค๋ฅธ ์ฑ…์ž„์„ ์ง€๊ฒŒ ๋˜๊ฒ ์ฃ .
DeliveryService๋Š” ๋ฐฐ๋‹ฌ ์ฒ˜๋ฆฌ๋ผ๋Š” ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ๋‹ด๋‹นํ•˜๋‹ˆ ๋ฐฐ๋‹ฌ ์š”์ฒญ์— ํ•„์š”ํ•œ ์ •๋ณด์— ์ ‘๊ทผํ•˜๊ธฐ ๋” ์‰ฌ์šธ ๊ฒƒ ๊ฐ™๊ณ 
์ˆ˜์ง‘ํ•œ ์ •๋ณด๋ฅผ DeliveryAgency์— ์ „๋‹ฌํ•˜๋Š”๊ฒŒ ์ž์—ฐ์Šค๋Ÿฌ์›Œ ๋ณด์—ฌ์š”.
์œ ์—ฐ์„ฑ ์ธก๋ฉด์—์„œ๋„ ๋งŒ์•ฝ DeliveryAgency ๊ตฌํ˜„์ฒด ๋‚ด๋ถ€์—์„œ ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์กฐํšŒํ•˜๋„๋ก ํ•œ๋‹ค๋ฉด
์ •๋ณด ์กฐํšŒ ๋ฐฉ์‹์ด ๋ณ€๊ฒฝ๋  ๋•Œ๋งˆ๋‹ค (์˜ˆ: ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ ์†Œ์Šค์—์„œ ์กฐํšŒ, ์กฐํšŒ ๋กœ์ง ๋ณ€๊ฒฝ ๋“ฑ) DeliveryAgency ๊ตฌํ˜„์ฒด๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
๋ฐ˜๋ฉด์— DeliveryService๊ฐ€ ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์ค€๋น„ํ•˜๋Š” ๊ฒฝ์šฐ ์ •๋ณด ์กฐํšŒ ๋ฐฉ์‹ ๋ณ€๊ฒฝ์€ DeliveryService ๋‚ด์—์„œ๋งŒ ์ด๋ฃจ์–ด์ง€๋ฏ€๋กœ DeliveryAgency๋Š” ๋ณ€๊ฒฝ์— ์˜ํ–ฅ์„ ๋ฐ›์ง€ ์•Š์„ ๊ฒƒ ๊ฐ™์•„์š”.

์ฐฝํ›ˆ๋‹˜์€ DeliveryAgency๊ฐ€ ์—ฌ๋Ÿฌ ์™ธ๋ถ€ ์„œ๋น„์Šค์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ผ๋ฉด ๊ฐ ์„œ๋น„์Šค์˜ ์ŠคํŽ™์ด ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๊ณ 
OrderService์—์„œ orderId๋งŒ ๋„˜๊ฒจ์ฃผ๋Š” ๊ฒƒ์ด OrderService์™€ DeliveryAgency์˜ ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ˜๋‹ค๊ณ  ํ•˜์…จ๋Š”๋ฐ
DeliveryAgency๋Š” ๊ฐ ์„œ๋น„์Šค์˜ ์ฐจ์ด์ ์„ ์บก์Šํ™”ํ•˜์—ฌ DeliveryService์—๊ฒŒ ์ผ๊ด€๋œ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•˜๋Š” ์—ญํ• ์„ ํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„์š”.
DeliveryAgency ๋‚ด๋ถ€์—์„œ ๊ฐ ์„œ๋น„์Šค์— ๋งž๋Š” ๋ฐ์ดํ„ฐ ๋ณ€ํ™˜์ด๋‚˜ ์ฒ˜๋ฆฌ๋ฅผ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ
๋ฐ์ดํ„ฐ ์กฐํšŒ ์ž์ฒด๋ฅผ DeliveryAgency์˜ ์ฑ…์ž„์œผ๋กœ ๋ณด๋Š” ๊ฒƒ์€ ๊ณผ๋„ํ•œ ๊ฒƒ ๊ฐ™์•„์š”.
๋˜ํ•œ OrderService์—์„œ orderId๋งŒ ๋„˜๊ฒจ์ฃผ๋Š” ๊ฒƒ์ด ๊ฒฐํ•ฉ๋„๋ฅผ ๋‚ฎ์ถ˜๋‹ค๋Š” ์ ์€ ์ผ๋ถ€ ๋™์˜ํ•˜์ง€๋งŒ
์ด๋Š” DeliveryAgency๊ฐ€ ํŠน์ • ๋„๋ฉ”์ธ(Order)์— ๊ฐ•ํ•˜๊ฒŒ ๊ฒฐํ•ฉ๋˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•  ์ˆ˜ ๋„ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š”.
๊ทธ๋ฆฌ๊ณ  DeliveryService๊ฐ€ ํ•„์š”ํ•œ ์ •๋ณด๋ฅผ ์ง์ ‘ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์˜ ๊ฒฝ์šฐ
DeliveryAgency๊ฐ€ ๋”์šฑ ์ผ๋ฐ˜์ ์ธ ๋ชฉ์ ์„ ์ˆ˜ํ–‰ํ•˜๋„๋ก ๋งŒ๋“ค์–ด
OrderService ์™ธ ๋‹ค๋ฅธ ์„œ๋น„์Šค์—์„œ๋„ ์žฌ์‚ฌ์šฉ๋  ๊ฐ€๋Šฅ์„ฑ์„ ๋†’์ผ ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์š”.
๋ฌผ๋ก  ์ƒํ™ฉ์— ๋”ฐ๋ผ ์ฐฝํ›ˆ๋‹˜์˜ ์˜๊ฒฌ์ด ๋” ์ ์ ˆํ•  ์ˆ˜๋„ ์žˆ์–ด์š”!
์˜ˆ๋ฅผ ๋“ค๋ฉด DeliveryAddress๋ฅผ DeliveryService์—์„œ ์ ‘๊ทผํ•˜๊ธฐ ์–ด๋ ต๊ฑฐ๋‚˜
DeliveryAgency ๋‚ด๋ถ€์—์„œ ์ตœ์ ํ™”๋œ ๋ฐฉ์‹์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•  ์ˆ˜ ์žˆ๋Š” ํŠน๋ณ„ํ•œ ๊ฒฝ์šฐ์—๋Š”
์ฐฝํ›ˆ๋‹˜์˜ ์˜๊ฒฌ์ด ๋” ํ•ฉ๋ฆฌ์ ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ํ•˜์ง€๋งŒ ์ €๋Š” SRP ์›์น™์„ ๊ณ ๋ คํ–ˆ์„ ๋•Œ ๋ฐ์ดํ„ฐ๋ฅผ ์ค€๋น„ํ•˜๋Š” ์ฑ…์ž„์€ DeliveryService์— ์žˆ๋Š” ๊ฒƒ์ด ๋” ๋ฐ”๋žŒ์งํ•˜๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค.
์—๊ณ  ๋ง์ด ๋„ˆ๋ฌด ๊ธธ์–ด์กŒ๋Š”๋ฐ ์ถ”๊ฐ€ ์˜๊ฒฌ ์žˆ์œผ์‹œ๋ฉด ์–ธ์ œ๋“ ์ง€ ๋ง์”€ํ•ด ์ฃผ์„ธ์š”. ๐Ÿ˜„

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์นœ์ ˆํ•œ ๋ฆฌ๋ทฐ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค๐Ÿ™‡โ€โ™‚๏ธ

์ €๋„ ๋‹ค์‹œํ•œ๋ฒˆ ๊ณ ๋ฏผํ•ด๋ณด๋‹ˆ
DeliveryAgency์˜ ๊ตฌํ˜„์ฒด๋“ค์ด ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋“ค์ด ๋‹ค๋ฅด๋”๋ผ๋„, ๊ทธ๊ฒƒ์˜ ์กฐํšŒ ์ฑ…์ž„์„ ๊ตฌํ˜„์ฒด์— ๋งก๊ธฐ๋Š”๊ฑด ์ข‹์ง€ ์•Š์€ ๊ฒƒ ๊ฐ™์•„์š”!

์ •๋ง ๋งŽ์ด ๋ณต์žกํ•˜๋‹ค๋ฉด ๊ทธ ์‹œ์ ์—์„œ๋Š” DeliveryService์™€ DeliveryAgency์‚ฌ์ด์— ๋ณ€ํ™˜ ํด๋ž˜์Šค๊ฐ€ ์ƒˆ๋กญ๊ฒŒ ๋“ฑ์žฅํ•˜๋Š”๊ฒŒ ์ ์ ˆํ•ด๋ณด์ด๊ธฐ๋„ ํ•˜๋„ค์š”!

๋˜ํ•œ ์‹ฌํ”Œํ•˜๊ฒŒ ์ธํ„ฐํŽ˜์ด์Šค ์ŠคํŽ™ ๊น”๋”ํ•˜๊ฒŒ ์ •ํ•˜๋Š”๊ฒŒ ๋ฒ ์ŠคํŠธ์ธ๊ฒƒ ๊ฐ™์•„์š”!

- Order๋ฅผ ์„œ๋น™ํ•˜๋ฉด Served๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค
- DeliveryOrder์˜ ๋ฐฐ๋‹ฌ์ด ์‹œ์ž‘๋˜๋ฉด Delivering๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค
- DeliveryOrder์˜ ๋ฐฐ๋‹ฌ์ด ์™„๋ฃŒ๋˜๋ฉด Delivered๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค
- Order๋ฅผ ์™„๋ฃŒํ•˜๋ฉด Complete๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค
hoon25 marked this conversation as resolved.
Show resolved Hide resolved
- EatInOrder๋Š” ๋“ฑ๋ก๋œ OrderTable์˜ ๋ชจ๋“  Order๊ฐ€ ์™„๋ฃŒ๋œ ์ƒํƒœ๋ฉด, OrderTable์„ NotOccupied๋กœ ๋ณ€๊ฒฝํ•˜๊ณ  numberOfGuests๋ฅผ 0๋ช…์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค