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
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
back-end/src/main/java/com/portfolio/backend/account/dto/AccountInfoResponse.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,34 @@ | ||
package com.portfolio.backend.account.dto; | ||
|
||
import com.portfolio.backend.account.Account; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class AccountInfoResponse { | ||
private Long id; | ||
private String email; | ||
private String nickname; | ||
private boolean isCertify; | ||
private List<String> roles; | ||
private LocalDateTime createdDate; | ||
private LocalDateTime modifiedDate; | ||
|
||
public AccountInfoResponse(Account account){ | ||
this.id = account.getId(); | ||
this.email = account.getEmail(); | ||
this.nickname = account.getNickname(); | ||
this.isCertify = account.isCertify(); | ||
this.roles = account.getRoles(); | ||
this.createdDate = account.getCreatedDate(); | ||
this.modifiedDate = account.getModifiedDate(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
back-end/src/main/java/com/portfolio/backend/account/dto/PasswordUpdateRequest.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 com.portfolio.backend.account.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class PasswordUpdateRequest { | ||
|
||
@NotBlank | ||
@Length(min=6, max = 50) | ||
private String beforePassword; | ||
|
||
@NotBlank | ||
@Length(min=6, max = 50) | ||
private String updatePassword; | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
back-end/src/main/java/com/portfolio/backend/account/dto/SignInRequest.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,26 @@ | ||
package com.portfolio.backend.account.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
import javax.validation.constraints.Email; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.Pattern; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class SignInRequest { | ||
|
||
@NotBlank | ||
private String email; | ||
|
||
@NotBlank | ||
@Length(min=6, max = 50) | ||
private String password; | ||
} |
31 changes: 31 additions & 0 deletions
31
back-end/src/main/java/com/portfolio/backend/account/dto/SignUpRequest.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,31 @@ | ||
package com.portfolio.backend.account.dto; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
import javax.validation.constraints.Email; | ||
import javax.validation.constraints.NotBlank; | ||
import javax.validation.constraints.Pattern; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class SignUpRequest { | ||
|
||
@NotBlank | ||
private String email; | ||
|
||
@NotBlank | ||
@Length(min=3, max = 20) | ||
@Pattern(regexp = "^[ㄱ-ㅎ가-힣a-zA-Z0-9_-]{3,20}$") | ||
private String nickname; | ||
|
||
@NotBlank | ||
@Length(min=6, max = 50) | ||
private String password; | ||
} |