-
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.
Merge pull request #180 from swyp3-babpool/develop
release: Develop merge into main
- Loading branch information
Showing
135 changed files
with
4,103 additions
and
1,198 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Spring Boot Gradle CICD (version 0.1.9) | ||
name: Spring Boot Gradle CICD (version 0.2.0) | ||
|
||
on: | ||
push: | ||
|
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
85 changes: 50 additions & 35 deletions
85
src/main/java/com/swyp3/babpool/domain/appointment/api/request/AppointmentCreateRequest.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,57 +1,72 @@ | ||
package com.swyp3.babpool.domain.appointment.api.request; | ||
|
||
import com.swyp3.babpool.domain.appointment.domain.Appointment; | ||
import com.swyp3.babpool.domain.appointment.domain.AppointmentStatus; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.*; | ||
import lombok.*; | ||
|
||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.Positive; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import java.util.List; | ||
import java.time.LocalDateTime; | ||
|
||
@ToString | ||
@Getter | ||
@NoArgsConstructor | ||
public class AppointmentCreateRequest { | ||
|
||
private Long appointmentId; // Not include in request body | ||
private Long requesterUserId; // Not include in request body | ||
private Long receiverUserId; // Not include in request body | ||
@Schema(description = "λ°₯μ½ μλ³ κ°", example = "null", nullable = true) | ||
@Setter | ||
@Null | ||
private Long appointmentId; | ||
|
||
@Schema(description = "λ°₯μ½ μ‘μ μ μλ³ κ°", example = "null", nullable = true) | ||
@Setter | ||
@Null | ||
private Long senderUserId; | ||
|
||
@Schema(description = "λ°₯μ½ μμ μ μλ³ κ°", example = "null", nullable = true) | ||
@Setter | ||
@Null | ||
private Long receiverUserId; | ||
|
||
@Schema(description = "λ°₯μ½ μμ μ νλ‘ν μλ³ κ°", example = "222222222222222222") | ||
@Positive(message = "μμ² λμ νλ‘ν μλ³ κ°μ΄ μ¬λ°λ₯΄μ§ μμ΅λλ€.") | ||
private Long targetProfileId; | ||
@NotEmpty(message = "κ°λ₯ν μκ° λ¦¬μ€νΈκ° λΉμ΄μμ΅λλ€.") | ||
private List<Long> possibleTimeIdList; | ||
|
||
@Schema(description = "μΌμ μλ³ κ°", example = "null", nullable = true) | ||
@Setter | ||
@Null | ||
private Long possibleDateTimeId; | ||
|
||
@Schema(description = "κ°λ₯ν μΌμ κ°", example = "2024-07-12T03:00:00") | ||
@NotNull(message = "κ°λ₯ν μΌμ κ°μ΄ λΉμ΄μμ΅λλ€.") | ||
private LocalDateTime possibleDateTime; | ||
|
||
@Schema(description = "μ§λ¬Έ λ΄μ©", example = "λ°₯μ½ κ°λ₯νκ°μ?") | ||
@NotBlank(message = "μ§λ¬Έ λ΄μ©μ΄ λΉμ΄μμ΅λλ€.") | ||
private String questionContents; | ||
private Long appointmentRequestId; // Not include in request body | ||
private String appointmentContent; | ||
|
||
@Builder | ||
public AppointmentCreateRequest(Long appointmentId, Long requesterUserId, Long receiverUserId, Long targetProfileId, List<Long> possibleTimeIdList, String questionContents, Long appointmentRequestId) { | ||
public AppointmentCreateRequest(Long appointmentId, Long senderUserId, Long receiverUserId, Long targetProfileId, Long possibleDateTimeId, LocalDateTime possibleDateTime, String appointmentContent) { | ||
this.appointmentId = appointmentId; | ||
this.requesterUserId = requesterUserId; | ||
this.senderUserId = senderUserId; | ||
this.receiverUserId = receiverUserId; | ||
this.targetProfileId = targetProfileId; | ||
this.possibleTimeIdList = possibleTimeIdList; | ||
this.questionContents = questionContents; | ||
this.appointmentRequestId = appointmentRequestId; | ||
} | ||
|
||
public void setAppointmentId(Long appointmentId) { | ||
this.appointmentId = appointmentId; | ||
} | ||
|
||
public void setRequesterUserId(Long userId) { | ||
this.requesterUserId = userId; | ||
this.possibleDateTimeId = possibleDateTimeId; | ||
this.possibleDateTime = possibleDateTime; | ||
this.appointmentContent = appointmentContent; | ||
} | ||
|
||
public void setReceiverUserId(Long targetReceiverUserId) { | ||
this.receiverUserId = targetReceiverUserId; | ||
public Appointment toEntity() { | ||
return Appointment.builder() | ||
.appointmentId(appointmentId) | ||
.appointmentSenderId(senderUserId) | ||
.appointmentReceiverId(receiverUserId) | ||
.possibleDateTimeId(possibleDateTimeId) | ||
.appointmentStatus(AppointmentStatus.WAITING) | ||
.appointmentContent(appointmentContent) | ||
.appointmentCreateDate(LocalDateTime.now()) | ||
.appointmentModifyDate(LocalDateTime.now()) | ||
.build(); | ||
} | ||
|
||
public void setAppointmentRequestId(Long appointmentRequestId) { | ||
this.appointmentRequestId = appointmentRequestId; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/swyp3/babpool/domain/appointment/api/request/AppointmentRejectRequest.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,11 +1,28 @@ | ||
package com.swyp3.babpool.domain.appointment.api.request; | ||
|
||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Null; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class AppointmentRejectRequest { | ||
@Null | ||
private Long rejectId; | ||
@NotNull(message = "appointmentIdλ νμ κ°μ λλ€.") | ||
private Long appointmentId; | ||
@NotEmpty(message = "κ±°μ λ©μμ§λ νμ κ°μ λλ€.") | ||
private String rejectMessage; | ||
|
||
@Builder | ||
public AppointmentRejectRequest(Long rejectId, Long appointmentId, String rejectMessage) { | ||
this.rejectId = rejectId; | ||
this.appointmentId = appointmentId; | ||
this.rejectMessage = rejectMessage; | ||
} | ||
|
||
public void setRejectId(Long rejectId) { | ||
this.rejectId = rejectId; | ||
} | ||
} |
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
Oops, something went wrong.