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] 메인 다가올 일정(1개) 조회 API - #58 #59

Merged
merged 7 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public record DateCreateReq(
String title,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy.MM.dd", timezone = "Asia/Seoul")
LocalDate date,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm", timezone = "Asia/Seoul")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "hh:mm a", timezone = "Asia/Seoul")
Copy link
Member

Choose a reason for hiding this comment

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

date에서 a값도 불필요하게 받아야 하는것 같습니다!
a를 빼주셔도 좋을 것 같아요!

LocalTime startAt,
List<TagCreateReq> tags,
String country,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
package org.dateroad.date.dto.response;public record DateGetNearestRes() {
package org.dateroad.date.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AccessLevel;
import lombok.Builder;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

@Builder(access = AccessLevel.PRIVATE)
public record DateGetNearestRes(
Long dateId,
int dDay,
String dateName,
int month,
int day,
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "hh:mm a", timezone = "Asia/Seoul")
Copy link
Member

Choose a reason for hiding this comment

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

여기도 a를 안받아주셔도 12:00 이렇게 매핑될 것 같습니다!

LocalTime startAt
) {
public static DateGetNearestRes of(Long dateId,
int dDay,
String dateName,
int month,
int day,
LocalTime startAt) {
return DateGetNearestRes.builder()
.dateId(dateId)
.dDay(dDay)
.dateName(dateName)
.month(month)
.day(day)
.startAt(startAt)
.build();
}

}