-
Notifications
You must be signed in to change notification settings - Fork 0
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
[SKRB-148] feat: 행사 생성 API 틀 구현 #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
커멘트 한번 확인해주세요 👍
|
||
import com.spaceclub.event.domain.Event; | ||
|
||
public record CreateEventRequest(Long id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dto를 뽑아야 api 명세가 나오지 않나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api틀 만든 PR 후 명세 관련 작업 커밋할 예정입니다! (DTO, controller 테스트)
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class EventService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서비스 인터페이스로 만들어 놓고 빠르게 api 명세 뽑아도 좋을것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서비스를 mock으로 테스트할 예정이라 class로 만들었습니다!
PR 제목 컨벤션 한번 확인해 주세요 feat이 빠졌어요 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컨벤션 관련된 변경사항만 수정하면 될 것 같습니다~
private final EventService eventService; | ||
|
||
@PostMapping | ||
public ResponseEntity<Void> saveEvent(@RequestBody CreateEventRequest request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저희 컨트롤러, 서비스에서 생성 관련 메소드는 create로 시작하기로 컨벤션 정했어요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EventController내의 메서드명이라 Event를 때고 create로 변경했습니다.
chore: controller 메서드 명 create으로 변경
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
//@NoArgsConstructor(access = AccessLevel.PROTECTED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
특별한 의미를 나타내지 않는 주석은 지워도 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API 틀을 만들기 위해 임시로 변경한 부분이라 주석처리 했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
💠 Jira 티켓 링크
🖥️ 작업 내용
✅ PR시 확인 사항
📢 리뷰어 전달 사항
틀 구현을 위해 임시로 넣은 값
controller
의Location
CreateEventRequest
의 파라미터,toEntity
메서드Event
엔티티의 기본 생성자