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

feat: Carpool Register API #19

Merged
merged 5 commits into from
Jan 21, 2024
Merged

feat: Carpool Register API #19

merged 5 commits into from
Jan 21, 2024

Conversation

Park-Young-Hun
Copy link
Member

πŸ“ Summary

Carpool Register API

πŸ‘©β€πŸ’» Contents

Carpool Register API

πŸ“ Review Note

DTO λ³€ν™˜ μ±…μž„μ— λŒ€ν•œ κ³ λ―Ό

πŸ“£ Related Issue

Copy link
Member

@Seokyeong237 Seokyeong237 left a comment

Choose a reason for hiding this comment

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

μˆ˜κ³ λ§ŽμœΌμ…¨μ–΄μš” :)


@Operation(description = "μΉ΄ν’€ 등둝")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "등둝 성곡")
Copy link
Member

Choose a reason for hiding this comment

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

μƒˆ λ¦¬μ†ŒμŠ€κ°€ μƒκΈ΄κ±°λ‹ˆ 201둜 κ°€λŠ” 게 더 쒋을 것 κ°™μ•„μš”!

Copy link
Member Author

Choose a reason for hiding this comment

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

μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€!

Comment on lines +28 to +29
@Column(name = "pickup_location")
private String pickupLocation;
Copy link
Member

Choose a reason for hiding this comment

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

μ •μ±…μ—μ„œ ν”½μ—…μž₯μ†Œ μ΅œλŒ€ 20자 μ΄λ‹ˆ @Length μ–΄λ…Έν…Œμ΄μ…˜μœΌλ‘œ μœ νš¨μ„± 검사 λΆ™μ—¬μ£Όλ©΄ 더 쒋을 것 κ°™μŠ΄λ‹€
ex) @Length(max = 20)

Copy link
Member Author

Choose a reason for hiding this comment

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

쒋은 λΆ€λΆ„ μ§šμ–΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€! 근데 μ €λŠ” κΈ€μž μ œν•œ μˆ˜μ™€ 같은 μ˜ˆμ™Έμ²˜λ¦¬λŠ” ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μΆ©λΆ„νžˆ 검증할 수 있고 자주 변동될 수 μžˆλŠ” λΉ„μ¦ˆλ‹ˆμŠ€ μš”κ΅¬μ‚¬ν•­μ΄κΈ° λ•Œλ¬Έμ— 도메인에 λ°˜μ˜μ‹œμΌœμ„œ λ”λΈ”μ²΄ν‚Ήν•˜κΈ°λ³΄λ‹¨ ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ κ²€μ¦ν•˜λŠ”κ²Œ μ’‹λ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€!

@NoArgsConstructor(access = PROTECTED)
@AllArgsConstructor(access = PROTECTED)
public class Cost {
private Long money;
Copy link
Member

Choose a reason for hiding this comment

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

ν¬λ§λΉ„μš©μ€ μ΅œλŒ€ 10μžλ„€μš”!

@EmbeddedId
private CarpoolId carpoolId;

private String content;
Copy link
Member

Choose a reason for hiding this comment

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

contentκ°€ νƒ‘μŠΉμžμ—κ²Œ μ „ν•  λ§μ΄κ΅°μš”! (μ΅œλŒ€ 150자) μ›Œλ”©μ΄ μ’€ 더 직관적이면 쒋을 것 같은데..! 흠,, messageλŠ” μ–΄λ–€κ°€μš”?
μ•„λ‹˜ note, memo....

Copy link
Member Author

Choose a reason for hiding this comment

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

μΉ΄ν’€ κ²Œμ‹œκΈ€μ— λ‚΄μš©μ΄λΌκ³  μƒκ°ν•˜μ—¬ content라고 넀이밍 ν–ˆμŠ΅λ‹ˆλ‹€! λ˜ν•œ νƒ‘μŠΉ μš”μ²­ 수락 λ•Œ νƒ‘μŠΉμžμ—κ²Œ λ³΄λ‚΄λŠ” λ©”μ‹œμ§€λ„ μžˆμ–΄μ„œ κ΅¬λΆ„ν•˜κΈ° μœ„ν•΄ μ΄λ ‡κ²Œ ν–ˆμŠ΅λ‹ˆλ‹€!


@Operation(description = "μΉ΄ν’€ 등둝")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "등둝 성곡")
Copy link
Member

Choose a reason for hiding this comment

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

@Valid μ–΄λ…Έν…Œμ΄μ…˜ λ“±λ‘ν•˜μ‹  κ±Έ λ³΄λ‹ˆ λ“±λ‘μ‹€νŒ¨ μΌ€μ΄μŠ€λ„ μžˆμ„ 것 κ°™μ•„μš”

Copy link
Member Author

Choose a reason for hiding this comment

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

사싀 μ €λŠ” μ„±κ³΅ν•œ μ‘λ‹΅λ§Œ Swagger에 λ“±λ‘ν•˜λŠ” 편인데 νŠΉμˆ˜ν•œ μ‹€νŒ¨ μΌ€μ΄μŠ€κ°€ μžˆκ±°λ‚˜ μΌ€μ΄μŠ€ λ³„λ‘œ λΆ„λ₯˜ν•  ν•„μš”μ„±μ΄ 생기면 좔후에 μΆ”κ°€ν•˜λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€!!

Comment on lines 11 to 17
@Target({ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : user")
public @interface CurrentMember {
public @interface CurrentUser {
}
}
Copy link
Member

Choose a reason for hiding this comment

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

πŸ‘πŸ‘πŸ‘πŸ‘πŸ‘

Comment on lines 14 to 17
public @interface CurrentMember {
public @interface CurrentUser {
}
}
Copy link
Member

Choose a reason for hiding this comment

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

CurrentMember μ•ˆμ— λ”°λ‘œ 또 CurrentUserλ₯Ό μž‘μ„±ν•œ μ΄μœ κ°€ μžˆμœΌμ‹€κΉŒμš”??

Copy link
Member Author

Choose a reason for hiding this comment

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

μˆ˜μ •ν–ˆμŠ΅λ‹ˆλ‹€!

Copy link
Member

@Seokyeong237 Seokyeong237 left a comment

Choose a reason for hiding this comment

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

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€ :))

@Park-Young-Hun Park-Young-Hun merged commit 1e90bcb into develop Jan 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Carpool register API
2 participants