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: Calender #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: Calender #43

wants to merge 2 commits into from

Conversation

AlreadyBold
Copy link
Contributor

No description provided.

@AlreadyBold AlreadyBold requested a review from khyu2 October 29, 2024 06:49
Copy link
Contributor

@khyu2 khyu2 left a comment

Choose a reason for hiding this comment

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

review 남기셨길래 ㅎㅎㅎ..

Comment on lines +8 to +22
public interface EventResponseInterface {

Long getId();
String getTitle();
String getDetail();

Category getCategory();

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss", timezone = "Asia/Seoul")
LocalDateTime getStartDate();

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss", timezone = "Asia/Seoul")
LocalDateTime getEndDate();

Long getMaxParticipant();
Copy link
Contributor

Choose a reason for hiding this comment

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

Response는 단순 dto 용도로만 사용되는 걸로 아는데 요러면 이점이 뭔가여 형님

Copy link
Contributor Author

Choose a reason for hiding this comment

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

일단 nativequery 를 DTO 맵핑 시켜주기 위해서 interface로 생성했고
프론트엔드에서 가공없이 보여줄수있게끔 jsonformat 설정해서 값을 반환하게끔 하였숨

이점은...
nativequery 에서 바로 DTO 맵핑가능해서 편하다 ( 일반 querydsl 이나 jpa 처럼 바로 맵핑해서 보내면 됨 )

이게 궁금한게 아닝가..?

Copy link
Contributor

Choose a reason for hiding this comment

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

오.. 이런 방식은 첨 알았네요 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

방법은 직접 map을 생성해서 맵핑해줄수도 있고.. 뭐 그렇다고는 하던데

중요한것은 nativeQuery<<<<<<<<<<<Querydsl 이라는 것인데

관련사항은 검색해보면 나올고야

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