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

#317 [feat] 엔티티 변경으로 인한 종합 일정 시간표 로직 리팩토링 #324

Merged
merged 14 commits into from
Aug 24, 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
@@ -0,0 +1,21 @@
package com.asap.server.service.time.dto.retrieve;

import com.asap.server.common.utils.DateUtil;

import java.time.LocalDate;
import java.util.List;

public record AvailableDatesRetrieveDto(
String month,
String day,
String dayOfWeek,
List<TimeSlotRetrieveDto> timeSlots
) {
public static AvailableDatesRetrieveDto of(final LocalDate date, final List<TimeSlotRetrieveDto> timeSlots) {
return new AvailableDatesRetrieveDto(
DateUtil.getMonth(date),
DateUtil.getDay(date),
DateUtil.getDayOfWeek(date),
timeSlots);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.asap.server.service.time.dto.retrieve;

import java.util.List;

public record TimeSlotRetrieveDto(
String time,
List<String> userNames,
int colorLevel
) {
Copy link
Member

Choose a reason for hiding this comment

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

P5
지극히 개인적인 의견입니다.

현재 저희가 TimeSlot은 enum으로 정하고 있어서, TimeSlot이라 하니까 시간만 정의 되어 있는 느낌이 든다고 생각합니다..

그래서 TimeSlot 말고 TimeBlock이란 네이밍은 어떻게 생각하시나요??

Copy link
Member Author

Choose a reason for hiding this comment

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

좋습니다!

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.asap.server.service.time.dto.retrieve;


import java.util.List;

public record TimeTableRetrieveDto(
int memberCount,
List<String> totalUserNames,
List<AvailableDatesRetrieveDto> availableDateTimes
) {
public static TimeTableRetrieveDto of(final List<String> totalUserNames, final List<AvailableDatesRetrieveDto> availableDateTimes) {
return new TimeTableRetrieveDto(totalUserNames.size(), totalUserNames, availableDateTimes);
}
}