-
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
1 parent
414b7da
commit 7a70c5e
Showing
69 changed files
with
798 additions
and
373 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
4 changes: 1 addition & 3 deletions
4
src/main/java/org/ioteatime/meonghanyangserver/auth/dto/request/EmailRequest.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,10 +1,8 @@ | ||
package org.ioteatime.meonghanyangserver.auth.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record EmailRequest( | ||
@Valid @Email @NotNull @Schema(description = "이메일", example = "[email protected]") | ||
String email) {} | ||
@Email @NotNull @Schema(description = "이메일", example = "[email protected]") String email) {} |
10 changes: 4 additions & 6 deletions
10
src/main/java/org/ioteatime/meonghanyangserver/auth/dto/request/LoginRequest.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,10 +1,8 @@ | ||
package org.ioteatime.meonghanyangserver.auth.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class LoginRequest { | ||
@NotBlank private String email; | ||
@NotBlank private String password; | ||
} | ||
public record LoginRequest( | ||
@NotBlank @Schema(description = "이메일", example = "[email protected]") String email, | ||
@NotBlank @Schema(description = "비밀번호", example = "testpassword") String password) {} |
9 changes: 9 additions & 0 deletions
9
src/main/java/org/ioteatime/meonghanyangserver/auth/dto/request/VerifyEmailRequest.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.ioteatime.meonghanyangserver.auth.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record VerifyEmailRequest( | ||
@Email @NotNull @Schema(description = "이메일", example = "[email protected]") String email, | ||
@NotNull @Schema(description = "인증 코드", example = "XV23W1") String code) {} |
14 changes: 14 additions & 0 deletions
14
src/main/java/org/ioteatime/meonghanyangserver/auth/mapper/AuthEntityMapper.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,14 @@ | ||
package org.ioteatime.meonghanyangserver.auth.mapper; | ||
|
||
import org.ioteatime.meonghanyangserver.user.domain.UserEntity; | ||
import org.ioteatime.meonghanyangserver.user.dto.request.JoinRequest; | ||
|
||
public class AuthEntityMapper { | ||
public static UserEntity of(JoinRequest userDto, String encodedPassword) { | ||
return UserEntity.builder() | ||
.nickname(userDto.getNickname()) | ||
.email(userDto.getEmail()) | ||
.password(encodedPassword) | ||
.build(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/ioteatime/meonghanyangserver/auth/mapper/AuthResponseMapper.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,23 @@ | ||
package org.ioteatime.meonghanyangserver.auth.mapper; | ||
|
||
import org.ioteatime.meonghanyangserver.auth.dto.reponse.LoginResponse; | ||
import org.ioteatime.meonghanyangserver.auth.dto.reponse.RefreshResponse; | ||
import org.ioteatime.meonghanyangserver.user.dto.response.UserSimpleResponse; | ||
|
||
public class AuthResponseMapper { | ||
public static UserSimpleResponse from(Long id, String email) { | ||
return new UserSimpleResponse(id, email); | ||
} | ||
|
||
public static LoginResponse from(Long id, String accessToken, String refreshToken) { | ||
return LoginResponse.builder() | ||
.userId(id) | ||
.accessToken(accessToken) | ||
.refreshToken(refreshToken) | ||
.build(); | ||
} | ||
|
||
public static RefreshResponse from(String newAccessToken) { | ||
return new RefreshResponse(newAccessToken); | ||
} | ||
} |
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
3 changes: 1 addition & 2 deletions
3
src/main/java/org/ioteatime/meonghanyangserver/cctv/dto/response/CctvInfoResponse.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,4 +1,3 @@ | ||
package org.ioteatime.meonghanyangserver.cctv.dto.response; | ||
|
||
public record CctvInfoResponse(Long cctvId, String cctvNickname, String kvsChannelName) { | ||
} | ||
public record CctvInfoResponse(Long cctvId, String cctvNickname, String kvsChannelName) {} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/ioteatime/meonghanyangserver/cctv/dto/response/CctvInviteResponse.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,13 @@ | ||
package org.ioteatime.meonghanyangserver.cctv.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
@Schema(description = "CCTV 초대 응답") | ||
public record CctvInviteResponse( | ||
@NotNull @Schema(description = "그룹 ID", example = "1") Long groupId, | ||
@NotNull | ||
@Schema( | ||
description = "KVS 채널 이름", | ||
example = "kvs-9bc02f62-df22-40b0-bdc1-610d8fd293b4") | ||
String kvsChannelId) {} |
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
5 changes: 5 additions & 0 deletions
5
src/main/java/org/ioteatime/meonghanyangserver/cctv/repository/CctvRepository.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,5 @@ | ||
package org.ioteatime.meonghanyangserver.cctv.repository; | ||
|
||
public interface CctvRepository { | ||
boolean existsByKvsChannelName(String kvsChannelName); | ||
} |
Oops, something went wrong.