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단계 - μˆ˜κ°•μ‹ μ²­(도메인 λͺ¨λΈ) #326

Open
wants to merge 13 commits into
base: choomi1217
Choose a base branch
from

Conversation

choomi1217
Copy link

μ•ˆλ…•ν•˜μ„Έμš”! μ„ ν λ‹˜ πŸ˜€

이전 μ½”λ“œλ¦¬λ·°μ— μ œκ°€ μ§ˆλ¬Έμ„ λͺ‡κ°œ ν–ˆλŠ”λ°.. λ¨Έμ§€λœ μƒνƒœλΌμ„œ μ„ ν λ‹˜κ»˜μ„œ 확인 λͺ»ν•΄μ£Όμ‹€κΉŒλ΄ μ•„λž˜μ— 링크λ₯Ό λ‹΅λ‹ˆλ‹€!
λ²ˆκ±°λ‘­μ§€λ§Œ 확인 ν›„ λ‹΅λ³€ λΆ€νƒλ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€. πŸ™‡
이전 μ½”λ“œλ¦¬λ·°

이번 κ΅¬ν˜„μ„ ν•˜λ©΄μ„œ λ„λŒ€μ²΄ 뭘 κ΅¬ν˜„ν•΄μ•Όν•˜λŠ”κ±°μ§€? πŸ€” λΌλŠ” 생각이 자꾸 λ“€λ”λΌκ΅¬μš”.
λ„λ©”μΈλ§Œ κ΅¬ν˜„ν•˜λ©΄ λ˜λŠ” 건지.. μ„œλΉ„μŠ€λ„ κ΅¬ν˜„μ„ ν•΄μ•Όν•˜λŠ”κ±΄μ§€..
μƒμ†Œν•œ νŒ¨ν„΄μ˜ 과제고 μ„œνˆ¬λ₯Έ μ½”λ“œμ§€λ§Œ μ„ ν λ‹˜μ˜ 도움을 λ°›κ³ μž μ˜¬λ €λ΄…λ‹ˆλ‹€.

μž˜λΆ€νƒλ“œλ¦½λ‹ˆλ‹€! πŸ™‡πŸ™‡πŸ™‡πŸ™‡πŸ™‡

Copy link

@shared-moon shared-moon left a comment

Choose a reason for hiding this comment

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

μ˜λ―Έλ‹˜ μ•ˆλ…•ν•˜μ„Έμš”!
2단계 λ―Έμ…˜ 잘 진행 ν•΄ μ£Όμ…¨λ„€μš” :)
μ½”λ©˜νŠΈλ₯Ό μ’€ 남겨 λ‘μ—ˆλŠ”λ°, 확인 ν›„ 리뷰 μž¬μš”μ²­ λΆ€νƒλ“œλ €μš”!
고생 λ§ŽμœΌμ…¨μŠ΅λ‹ˆλ‹€ ~

@@ -0,0 +1,5 @@
package nextstep.courses.domain;

public enum ImageExtension {

Choose a reason for hiding this comment

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

ν™•μž₯μžλŠ” enum보닀 μ •κ·œμ‹μœΌλ‘œ κ²€μ‚¬ν•΄λ³΄λŠ”κ²Œ μ–΄λ–¨κΉŒμš” ?

}
}

public PaidSessionType registered(long payedPrice, int headCount) {

Choose a reason for hiding this comment

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

등둝 κ°€λŠ₯ν•œμ§€ ν™•μΈν•˜λŠ” 뢀뢄을 μΆ”μƒν™”ν•˜λ©΄ 쒋을 것 κ°™μ•„μš”! μ§€κΈˆμ€ μΈν„°νŽ˜μ΄μŠ€μ— λ©”μ„œλ“œκ°€ ν•˜λ‚˜λ„ μ—†λŠ” 것 κ°™μ•„μ„œμš”..!
λ‚˜μ•„κ°€μ„œ 그런 λŠλ‚Œμ΄ λœλ‹€λ©΄ sessionType을 Enum으둜 관리해도 쒋지 μ•Šμ„κΉŒμš” ?
μ§€κΈˆμ€ SessionType을 DB둜 κ΄€λ¦¬ν•˜λ €λ©΄ μ–˜λ„ λ³„λ„μ˜ 도메인이 λ˜μ–΄μ•Ό ν•  것 κ°™μ•„μš”!

@@ -0,0 +1,13 @@
package nextstep.courses.domain;

public class Session {

Choose a reason for hiding this comment

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

μƒμ„±μžλž‘ λ©”μ„œλ“œκ°€ λ‹€ μ—†κ΅°μš”..!
μˆ˜κ°• 신청에 λŒ€ν•œ μ±…μž„μ€ Session이 가지고 μžˆμ–΄μ•Ό ν•˜μ§€ μ•Šμ„κΉŒμš” ?

Copy link
Author

Choose a reason for hiding this comment

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

λ„ˆλ¬΄ λ§‰λ§‰ν–ˆμŠ΅λ‹ˆλ‹€.. 😒

  1. service에 막 κ΅¬ν˜„λ§Œ 해보고 이처럼 도메인에 μ±…μž„μ„ λ„˜κΈ°λ €λ‹ˆ 감이 잘 μ˜€μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.
  2. λ„λ©”μΈμ˜ μ±…μž„μ— λŒ€ν•œ 감이 μ•ˆμ˜€λ‹ˆ λ―Έμ…˜μ„ μ΄ν•΄ν•˜κΈ° νž˜λ“€μ—ˆμŠ΅λ‹ˆλ‹€.

μ„ ν λ‹˜κ»˜μ„œλ„ 그뢀뢄을 λŠλΌμ…¨λŠ”μ§€ λ”°λœ»ν•˜κ²Œ ν”Όλ“œλ°± ν•΄μ£Όμ…”μ„œ 쑰금 κΈ°μš΄μ„ μ°¨λ¦° 것 κ°™μŠ΅λ‹ˆλ‹€.
μ •μ‹  차리고 λ‹€μ‹œ ν•΄μ„œ pr μ˜¬λ¦¬κ² μŠ΅λ‹ˆλ‹€. πŸ™‡πŸ™‡πŸ™‡πŸ™‡πŸ™‡


public class SessionImage {

private static final int ONE_MEGA_BYTE = 1_000_000;

Choose a reason for hiding this comment

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

파일 ν¬κΈ°λŠ” 보톡 byte λ‹¨μœ„λ‘œ, 1024*1024 μš”λŸ° μ‹μœΌλ‘œ ν‘œν˜„ν•΄μš” ~

validation(width, height);
this.width = width;
this.height = height;
this.ratio = calculateRatio();

Choose a reason for hiding this comment

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

음 ? 이걸 μ™œ 가지고 μžˆλŠ”κ±°μ£  ?

}

private void ratioValidate(int width, int height) {
if (WIDTH_RATIO != calculaateWidthRatio(width) && HEIGHT_RATIO != calculaateHeightRatio(height)) {

Choose a reason for hiding this comment

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

μ–˜λŠ” width * HEIGHT_RATIO != height * WIDTH_RATIO μš”λ ‡κ²Œ ν‘œν˜„ν•  수 μžˆμ„ 것 κ°™μ•„μš”!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants