Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Aug 7, 2024
2 parents 6df66fc + 1a7a8ae commit 8f12d80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import leets.weeth.domain.schedule.application.annotation.ScheduleTimeCheck;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

Expand All @@ -28,7 +28,8 @@ public record Save(
@NotBlank String location,
@NotBlank String requiredItem,
@NotNull String memberCount,
@ScheduleTimeCheck ScheduleDTO.Time time
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end
) {}

public record Update(
Expand All @@ -37,6 +38,7 @@ public record Update(
@NotBlank String location,
@NotBlank String requiredItem,
@NotNull String memberCount,
@ScheduleTimeCheck ScheduleDTO.Time time
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import leets.weeth.domain.schedule.application.annotation.ScheduleTimeCheck;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static leets.weeth.domain.schedule.application.dto.ScheduleDTO.Time;

public class MeetingDTO {

public record Response(
Expand All @@ -30,7 +28,8 @@ public record Save(
@NotBlank String title,
@NotBlank String content,
@NotBlank String location,
@ScheduleTimeCheck Time time,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end,
@NotNull Integer weekNumber,
@NotNull Integer cardinal
) {}
Expand All @@ -39,7 +38,8 @@ public record Update(
@NotBlank String title,
@NotBlank String content,
@NotBlank String location,
@ScheduleTimeCheck Time time,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime start,
@NotNull @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) LocalDateTime end,
@NotNull Integer weekNumber,
@NotNull Integer cardinal
) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ public void updateUpperClass(EventDTO.Update dto, User user) {
this.title = dto.title();
this.content = dto.content();
this.location = dto.location();
this.start = dto.time().start();
this.end = dto.time().end();
this.start = dto.start();
this.end = dto.end();
this.user = user;
}

public void updateUpperClass(MeetingDTO.Update dto, User user) {
this.title = dto.title();
this.content = dto.content();
this.location = dto.location();
this.start = dto.time().start();
this.end = dto.time().end();
this.start = dto.start();
this.end = dto.end();
this.user = user;
}
}

0 comments on commit 8f12d80

Please sign in to comment.