Skip to content

Commit

Permalink
feat(Room): Room TrainingDays 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
junhyeongkim2 committed Nov 1, 2024
1 parent 9535c06 commit 2c58839
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/richjun/campride/room/domain/Room.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public class Room extends BaseEntity {
@Temporal(TemporalType.TIMESTAMP)
private LocalDateTime departureTime;

@Column(nullable = false)
private int trainingDays;
// @Column(nullable = false)
// private int trainingDays;

@Column(nullable = false)
private int maxParticipants;
Expand Down Expand Up @@ -110,7 +110,6 @@ public static Room of(final RoomRequest roomRequest, Long leaderId, String leade
roomRequest.getDestination(),
destinationLocation,
roomRequest.getDepartureTime(),
roomRequest.getTrainingDays(),
roomRequest.getMaxParticipants(),
roomRequest.getRoomType(),
new ArrayList<>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public class RoomRequest {
// @JsonFormat(pattern = "yyyy-MM-dd-HH:mm")
private LocalDateTime departureTime;

@NotNull(message = "훈련량을 선택해 주세요.")
@Min(value = 1, message = "훈련량이 1보다 작을 수 없습니다.")
@Max(value = 10, message = "훈련량이 10보다 클 수 없습니다.")
private int trainingDays;
// @NotNull(message = "훈련량을 선택해 주세요.")
// @Min(value = 1, message = "훈련량이 1보다 작을 수 없습니다.")
// @Max(value = 10, message = "훈련량이 10보다 클 수 없습니다.")
// private int trainingDays;

@NotNull(message = "방 최대 참여 인원을 선택해 주세요.")
@Min(value = 2, message = "방 최대 참여 인원이 2보다 작을 수 없습니다.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class RoomJoinedResponse {
private String destination;
private Location destinationLocation;
private LocalDateTime departureTime;
private int trainingDays;
private int maxParticipants;
private RoomType roomType;
private List<ParticipantResponse> participants;
Expand All @@ -41,7 +40,6 @@ public static RoomJoinedResponse from(Room room, LatestMessageResponse latestMes
room.getDestination(),
room.getDestinationLocation(),
room.getDepartureTime(),
room.getTrainingDays(),
room.getMaxParticipants(),
room.getRoomType(),
ParticipantResponse.from(room.getParticipants()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class RoomResponse {
private Location destinationLocation;
private LocalDateTime departureTime;
private int trainingDays;
private int maxParticipants;
private RoomType roomType;
private List<ParticipantResponse> participants;
private LocalDateTime createdAt;
Expand All @@ -52,7 +51,6 @@ public static RoomResponse from(Room room) {
room.getDestination(),
room.getDestinationLocation(),
room.getDepartureTime(),
room.getTrainingDays(),
room.getMaxParticipants(),
room.getRoomType(),
ParticipantResponse.from(room.getParticipants()),
Expand Down

0 comments on commit 2c58839

Please # to comment.