-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
431 additions
and
58 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
11 changes: 11 additions & 0 deletions
11
src/main/java/org/sopt/seonyakServer/domain/appointment/dto/AppointmentAcceptRequest.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.sopt.seonyakServer.domain.appointment.dto; | ||
|
||
import java.util.List; | ||
import org.sopt.seonyakServer.domain.appointment.model.DataTimeRange; | ||
|
||
public record AppointmentAcceptRequest( | ||
Long appointmentId, | ||
String googleMeetLink, | ||
List<DataTimeRange> timeList | ||
) { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/java/org/sopt/seonyakServer/domain/appointment/dto/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.sopt.seonyakServer.domain.appointment.dto; | ||
|
||
public record AppointmentRejectRequest( | ||
Long appointmentId, | ||
String rejectReason, | ||
String rejectDetail | ||
) { | ||
} |
6 changes: 0 additions & 6 deletions
6
src/main/java/org/sopt/seonyakServer/domain/appointment/dto/GoogleMeetLinkRequest.java
This file was deleted.
Oops, something went wrong.
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
23 changes: 8 additions & 15 deletions
23
...main/java/org/sopt/seonyakServer/domain/appointment/repository/AppointmentRepository.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,24 +1,17 @@ | ||
package org.sopt.seonyakServer.domain.appointment.repository; | ||
|
||
import java.util.Optional; | ||
import org.sopt.seonyakServer.domain.appointment.model.Appointment; | ||
import org.sopt.seonyakServer.global.exception.enums.ErrorType; | ||
import org.sopt.seonyakServer.global.exception.model.CustomException; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
public interface AppointmentRepository extends JpaRepository<Appointment, Long> { | ||
|
||
@Query("SELECT a.googleMeetLink " | ||
+ "FROM Appointment a " | ||
+ "WHERE a.id = :appointmentId") | ||
String findGoogleMeetLinkById(@Param("appointmentId") Long appointmentId); | ||
Optional<Appointment> findAppointmentById(Long id); | ||
|
||
@Query("SELECT a.member.id " | ||
+ "FROM Appointment a " | ||
+ "WHERE a.id = :appointmentId") | ||
Long findMemberIdById(@Param("appointmentId") Long appointmentId); | ||
|
||
@Query("SELECT a.senior.id " | ||
+ "FROM Appointment a " | ||
+ "WHERE a.id = :appointmentId") | ||
Long findSeniorIdById(@Param("appointmentId") Long appointmentId); | ||
default Appointment findAppointmentByIdOrThrow(Long id) { | ||
return findAppointmentById(id) | ||
.orElseThrow(() -> new CustomException(ErrorType.NOT_FOUND_APPOINTMENT_ERROR)); | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
src/main/java/org/sopt/seonyakServer/domain/member/dto/MemberJoinRequest.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.sopt.seonyakServer.domain.member.dto; | ||
|
||
import java.util.List; | ||
|
||
public record MemberJoinRequest( | ||
String role, | ||
Boolean isSubscribed, | ||
String nickname, | ||
String image, | ||
String phoneNumber, | ||
String univName, | ||
String field, | ||
List<String> departmentList, | ||
String businessCard, | ||
String company, | ||
String position, | ||
String detailPosition, | ||
String level | ||
) { | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/sopt/seonyakServer/domain/member/dto/MemberJoinResponse.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.sopt.seonyakServer.domain.member.dto; | ||
|
||
public record MemberJoinResponse( | ||
String role | ||
) { | ||
public static MemberJoinResponse of(final String role) { | ||
return new MemberJoinResponse(role); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/java/org/sopt/seonyakServer/domain/member/dto/SendCodeRequest.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,6 +1,9 @@ | ||
package org.sopt.seonyakServer.domain.member.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public record SendCodeRequest( | ||
@NotBlank(message = "전화번호는 공백일 수 없습니다.") | ||
String phoneNumber | ||
) { | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/org/sopt/seonyakServer/domain/member/dto/VerifyCodeRequest.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,7 +1,12 @@ | ||
package org.sopt.seonyakServer.domain.member.dto; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public record VerifyCodeRequest( | ||
@NotBlank(message = "전화번호는 공백일 수 없습니다.") | ||
String phoneNumber, | ||
|
||
@NotBlank(message = "인증번호는 공백일 수 없습니다.") | ||
String verificationCode | ||
) { | ||
} |
Oops, something went wrong.