-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Refactor #116 일정 생성 로직 수정
- Loading branch information
Showing
30 changed files
with
160 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 5 additions & 41 deletions
46
src/main/java/leets/weeth/domain/schedule/application/dto/MeetingDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,24 @@ | ||
package leets.weeth.domain.schedule.application.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import org.springframework.format.annotation.DateTimeFormat; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public class MeetingDTO { | ||
|
||
public record ResponseAll( | ||
Long id, | ||
String title, | ||
String content, | ||
String location, | ||
LocalDateTime start, | ||
LocalDateTime end, | ||
Integer weekNumber, | ||
Integer cardinal, | ||
Integer code, | ||
String name, | ||
Integer memberCount, | ||
LocalDateTime createdAt, | ||
LocalDateTime modifiedAt | ||
) {} | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public record Response( | ||
Long id, | ||
String title, | ||
String content, | ||
String location, | ||
String requiredItem, | ||
String name, | ||
Integer code, | ||
LocalDateTime start, | ||
LocalDateTime end, | ||
String name, | ||
Integer memberCount, | ||
String requiredItem, | ||
LocalDateTime createdAt, | ||
LocalDateTime modifiedAt | ||
) {} | ||
|
||
public record Save( | ||
@NotBlank String title, | ||
@NotBlank String content, | ||
@NotBlank String location, | ||
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start, | ||
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end, | ||
@NotNull Integer weekNumber, | ||
@NotNull Integer cardinal | ||
) {} | ||
|
||
public record Update( | ||
@NotBlank String title, | ||
@NotBlank String content, | ||
@NotBlank String location, | ||
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start, | ||
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end, | ||
@NotNull Integer weekNumber, | ||
@NotNull Integer cardinal | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 6 additions & 10 deletions
16
src/main/java/leets/weeth/domain/schedule/application/mapper/MeetingMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/main/java/leets/weeth/domain/schedule/application/usecase/EventUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
package leets.weeth.domain.schedule.application.usecase; | ||
|
||
import leets.weeth.domain.schedule.application.dto.ScheduleDTO; | ||
|
||
import static leets.weeth.domain.schedule.application.dto.EventDTO.*; | ||
|
||
public interface EventUseCase { | ||
|
||
Response find(Long eventId); | ||
|
||
void save(Save dto, Long userId); | ||
void save(ScheduleDTO.Save dto, Long userId); | ||
|
||
void update(Long eventId, Update dto, Long userId); | ||
void update(Long eventId, ScheduleDTO.Update dto, Long userId); | ||
|
||
void delete(Long eventId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 5 additions & 9 deletions
14
src/main/java/leets/weeth/domain/schedule/application/usecase/MeetingUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
package leets.weeth.domain.schedule.application.usecase; | ||
|
||
import java.util.List; | ||
import leets.weeth.domain.schedule.application.dto.ScheduleDTO; | ||
|
||
import static leets.weeth.domain.schedule.application.dto.MeetingDTO.*; | ||
import static leets.weeth.domain.schedule.application.dto.MeetingDTO.Response; | ||
|
||
public interface MeetingUseCase { | ||
|
||
Response find(Long eventId); | ||
Response find(Long userId, Long eventId); | ||
|
||
void save(Save dto, Long userId); | ||
void save(ScheduleDTO.Save dto, Long userId); | ||
|
||
void update(Update dto, Long userId, Long meetingId); | ||
void update(ScheduleDTO.Update dto, Long userId, Long meetingId); | ||
|
||
void delete(Long meetingId); | ||
|
||
List<ResponseAll> findAll(Integer cardinal); | ||
|
||
List<ResponseAll> findAll(); | ||
} |
Oops, something went wrong.