-
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
18 changed files
with
148 additions
and
224 deletions.
There are no files selected for viewing
20 changes: 8 additions & 12 deletions
20
src/main/java/bootcamp/wssrs/domain/Member/dto/request/FindMemberRequestDTO.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,18 +1,14 @@ | ||
package bootcamp.wssrs.domain.Member.dto.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Pattern; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
public class FindMemberRequestDTO { | ||
@Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "올바르지 않은 이메일 형식입니다.") | ||
@NotBlank(message = "이메일을 입력해주세요.") | ||
private String email; | ||
public record FindMemberRequestDTO( | ||
@Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "올바르지 않은 이메일 형식입니다.") | ||
@NotBlank(message = "이메일을 입력해주세요.") | ||
String email, | ||
|
||
@NotBlank(message = "학번을 입력해주세요.") | ||
@Pattern(regexp = "^\\d{8}$", message = "올바르지 않은 형식입니다.") | ||
private String studentId; | ||
} | ||
@NotBlank(message = "학번을 입력해주세요.") | ||
@Pattern(regexp = "^\\d{8}$", message = "올바르지 않은 형식입니다.") | ||
String studentId | ||
) {} |
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
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
32 changes: 14 additions & 18 deletions
32
src/main/java/bootcamp/wssrs/domain/Member/dto/request/SignupRequestDTO.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,26 +1,22 @@ | ||
package bootcamp.wssrs.domain.Member.dto.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Pattern; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
public class SignupRequestDTO { | ||
@NotBlank(message = "학번을 입력해주세요.") | ||
@Pattern(regexp = "^\\d{8}$", message = "8자리의 숫자만 입력해주세요.") | ||
private String studentId; | ||
public record SignupRequestDTO( | ||
@NotBlank(message = "학번을 입력해주세요.") | ||
@Pattern(regexp = "^\\d{8}$", message = "8자리의 숫자만 입력해주세요.") | ||
String studentId, | ||
|
||
@Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[~!@#$%^&*()_+`\\-={}|:\";'<>?,./]).{8,}$", message = "영문자, 숫자, 특수문자를 각각 최소 1개 이상 사용해주세요.") | ||
@NotBlank(message = "비밀번호를 입력해주세요.") | ||
private String password; | ||
@Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[~!@#$%^&*()_+`\\-={}|:\";'<>?,./]).{8,}$", message = "영문자, 숫자, 특수문자를 각각 최소 1개 이상 사용해주세요.") | ||
@NotBlank(message = "비밀번호를 입력해주세요.") | ||
String password, | ||
|
||
@Pattern(regexp = "^[a-zA-Z가-힣]+$", message = "올바르지 않은 형식입니다.") | ||
@NotBlank(message = "이름을 입력해주세요.") | ||
private String username; | ||
@Pattern(regexp = "^[a-zA-Z가-힣]+$", message = "올바르지 않은 형식입니다.") | ||
@NotBlank(message = "이름을 입력해주세요.") | ||
String username, | ||
|
||
@Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "올바르지 않은 이메일 형식입니다.") | ||
@NotBlank(message = "이메일을 입력해주세요.") | ||
private String email; | ||
} | ||
@Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$", message = "올바르지 않은 이메일 형식입니다.") | ||
@NotBlank(message = "이메일을 입력해주세요.") | ||
String email | ||
) {} |
20 changes: 6 additions & 14 deletions
20
src/main/java/bootcamp/wssrs/domain/Member/dto/response/LoginResponseDTO.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,16 +1,8 @@ | ||
package bootcamp.wssrs.domain.Member.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class LoginResponseDTO { | ||
private String accessToken; | ||
private String refreshToken; | ||
private String username; | ||
private String studentId; | ||
} | ||
public record LoginResponseDTO( | ||
String accessToken, | ||
String refreshToken, | ||
String username, | ||
String studentId | ||
) {} |
18 changes: 5 additions & 13 deletions
18
src/main/java/bootcamp/wssrs/domain/Member/dto/response/PasswordUpdateResponseDTO.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,18 +1,10 @@ | ||
package bootcamp.wssrs.domain.Member.dto.response; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@NoArgsConstructor | ||
public class PasswordUpdateResponseDTO { | ||
|
||
private String msg; | ||
private String newPassword; | ||
|
||
public record PasswordUpdateResponseDTO( | ||
String msg, | ||
String newPassword | ||
) { | ||
public PasswordUpdateResponseDTO(String newPassword) { | ||
this.msg = "ok"; | ||
this.newPassword = newPassword; | ||
this("ok", newPassword); | ||
} | ||
} |
12 changes: 3 additions & 9 deletions
12
src/main/java/bootcamp/wssrs/domain/Member/dto/response/ReissueAccessTokenResponseDTO.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,5 @@ | ||
package bootcamp.wssrs.domain.Member.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@AllArgsConstructor | ||
public class ReissueAccessTokenResponseDTO { | ||
private String newAccessToken; | ||
} | ||
public record ReissueAccessTokenResponseDTO( | ||
String newAccessToken | ||
) {} |
14 changes: 5 additions & 9 deletions
14
src/main/java/bootcamp/wssrs/domain/Member/dto/response/SearchStudentIdResponseDTO.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,16 +1,12 @@ | ||
package bootcamp.wssrs.domain.Member.dto.response; | ||
|
||
import bootcamp.wssrs.domain.Member.entity.Member; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
public class SearchStudentIdResponseDTO { | ||
private String msg; | ||
private String password; | ||
|
||
public record SearchStudentIdResponseDTO( | ||
String msg, | ||
String password | ||
) { | ||
public SearchStudentIdResponseDTO(Member member) { | ||
this.msg = "ok"; | ||
this.password = member.getPassword(); | ||
this("ok", member.getPassword()); | ||
} | ||
} |
10 changes: 3 additions & 7 deletions
10
src/main/java/bootcamp/wssrs/domain/Member/dto/response/SignupResponseDTO.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,9 +1,5 @@ | ||
package bootcamp.wssrs.domain.Member.dto.response; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
public class SignupResponseDTO { | ||
private String msg; | ||
} | ||
public record SignupResponseDTO( | ||
String msg | ||
) {} |
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
12 changes: 4 additions & 8 deletions
12
src/main/java/bootcamp/wssrs/domain/Notice/dto/request/AdminConfirmRequestDTO.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,13 +1,9 @@ | ||
package bootcamp.wssrs.domain.Notice.dto.request; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
@Getter @Setter | ||
public class AdminConfirmRequestDTO { | ||
@NotNull(message = "근무 지원 ID를 선택해주세요.") | ||
private List<Long> recruitIds; | ||
} | ||
public record AdminConfirmRequestDTO( | ||
@NotNull(message = "근무 지원 ID를 선택해주세요.") | ||
List<Long> recruitIds | ||
) {} |
27 changes: 11 additions & 16 deletions
27
src/main/java/bootcamp/wssrs/domain/Notice/dto/request/UserRecruitRequestDTO.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,27 +1,22 @@ | ||
package bootcamp.wssrs.domain.Notice.dto.request; | ||
|
||
|
||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Pattern; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.List; | ||
|
||
@Getter @Setter | ||
public class UserRecruitRequestDTO { | ||
@NotBlank(message = "근무 코드를 입력해주세요.") | ||
private String code; | ||
public record UserRecruitRequestDTO( | ||
@NotBlank(message = "근무 코드를 입력해주세요.") | ||
String code, | ||
|
||
@Pattern(regexp = "^(01[016789]-?\\d{3,4}-?\\d{4}|\\d{2,3}-?\\d{3,4}-?\\d{4})$") | ||
@NotBlank(message = "전화번호를 입력해주세요.") | ||
private String phoneNum; | ||
@Pattern(regexp = "^(01[016789]-?\\d{3,4}-?\\d{4}|\\d{2,3}-?\\d{3,4}-?\\d{4})$") | ||
@NotBlank(message = "전화번호를 입력해주세요.") | ||
String phoneNum, | ||
|
||
@NotEmpty(message = "근무 날짜를 한 개 이상 선택해주세요.") // @NotBlank는 문자열(String) 타입에만 적용 가능, 컬렉션 객체에 사용. | ||
private List<String> day; | ||
@NotEmpty(message = "근무 날짜를 한 개 이상 선택해주세요.") | ||
List<String> day, | ||
|
||
@NotNull(message = "조합원 가입 유무에 체크해주세요.") | ||
private Boolean isUnion; // @NotBlank는 문자열(String) 타입에만 적용 가능 | ||
} | ||
@NotNull(message = "조합원 가입 유무에 체크해주세요.") | ||
Boolean isUnion | ||
) {} |
30 changes: 11 additions & 19 deletions
30
src/main/java/bootcamp/wssrs/domain/Notice/dto/response/AdminFindAllNoticeDTO.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,33 +1,25 @@ | ||
package bootcamp.wssrs.domain.Notice.dto.response; | ||
|
||
import bootcamp.wssrs.domain.Notice.entity.Notice; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.springframework.data.domain.Page; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Getter @Setter | ||
public class AdminFindAllNoticeDTO { | ||
private Long totalCount; | ||
private List<AdminFindAllNoticeInnerClass> notices; | ||
|
||
public record AdminFindAllNoticeDTO( | ||
Long totalCount, | ||
List<AdminFindAllNoticeInnerClass> notices | ||
) { | ||
public AdminFindAllNoticeDTO(Long totalCount, Page<Notice> pages) { | ||
this.notices = pages.stream().map(AdminFindAllNoticeInnerClass::new).toList(); | ||
this.totalCount = totalCount; | ||
this(totalCount, pages.stream().map(AdminFindAllNoticeInnerClass::new).toList()); | ||
} | ||
|
||
@Getter @Setter | ||
static class AdminFindAllNoticeInnerClass { | ||
private Long id; | ||
private String title; | ||
private LocalDateTime createdAt; | ||
|
||
public record AdminFindAllNoticeInnerClass( | ||
Long id, | ||
String title, | ||
LocalDateTime createdAt | ||
) { | ||
public AdminFindAllNoticeInnerClass(Notice notice) { | ||
this.id = notice.getId(); | ||
this.title = notice.getTitle(); | ||
this.createdAt = notice.getCreatedAt(); | ||
this(notice.getId(), notice.getTitle(), notice.getCreatedAt()); | ||
} | ||
} | ||
} |
Oops, something went wrong.