Skip to content

Commit

Permalink
Merge pull request #112 from team9502/dev
Browse files Browse the repository at this point in the history
feat: ๋กœ๊ทธ์ธ ์—†์ด ๊ธฐ์—…(ํšŒ์›) ํ”„๋กœํ•„ ์กฐํšŒ ๊ฐ€๋Šฅ ... ๋„ˆ๋ฌด ๋งŽ์€๋ฐ์š” ๊ธฐ๋Šฅ์ด
  • Loading branch information
EUNCHAEv1006 authored Jun 19, 2024
2 parents 7775780 + a1089f0 commit 129ef34
Show file tree
Hide file tree
Showing 46 changed files with 868 additions and 207 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/sinChul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
export SECRET_ACCESS_KEY="${{ secrets.SECRET_ACCESS_KEY }}"
export GOOGLE_ACCOUNT="${{ secrets.GOOGLE_ACCOUNT }}"
export GOOGLE_PASSWORD="${{ secrets.GOOGLE_PASSWORD }}"
export GOOGLE_CLIENT_ID="${{ secrets.GOOGLE_CLIENT_ID }}"
export GOOGLE_CLIENT_SECRET="${{ secrets.GOOGLE_CLIENT_SECRET }}"
export GOOGLE_REDIRECT_URI="${{ secrets.GOOGLE_REDIRECT_URI }}"
# JAR ํŒŒ์ผ์„ /home/ec2-user ๋””๋ ‰ํ† ๋ฆฌ์—์„œ ์‹คํ–‰
nohup java -jar /home/ec2-user/*.jar > nohup.out 2>&1 &
Expand All @@ -69,3 +72,6 @@ jobs:
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
GOOGLE_ACCOUNT: ${{ secrets.GOOGLE_ACCOUNT }}
GOOGLE_PASSWORD: ${{ secrets.GOOGLE_PASSWORD }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_REDIRECT_URI: ${{ secrets.GOOGLE_REDIRECT_URI }}
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'

// OAuth2
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.security:spring-security-oauth2-core'

// Springdoc OpenAPI
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,29 @@ public class AuthController {
private final AuthService authService;

@PostMapping("/signup")
@Operation(summary = "๊ตฌ์ง์ž ํšŒ์› ๊ฐ€์ž…", description = "์ƒˆ๋กœ์šด ์‚ฌ์šฉ์ž๋ฅผ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ๊ตฌ์ง์ž ํšŒ์›๊ฐ€์ž…์ž…๋‹ˆ๋‹ค.")
@Operation(summary = "๊ตฌ์ง์ž ํšŒ์› ๊ฐ€์ž…", description = "์ƒˆ๋กœ์šด ๊ตฌ์ง์ž ์‚ฌ์šฉ์ž๋ฅผ ์‹œ์Šคํ…œ์— ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฉ”์ผ ์ธ์ฆ์ด ์„ ํ–‰๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํšŒ์›๊ฐ€์ž…์‹œ 300ํฌ์ธํŠธ๊ฐ€ ์ ๋ฆฝ๋ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "๊ตฌ์ง์ž ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"201\", \"message\": \"๊ตฌ์ง์ž ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์‹คํŒจ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์‹คํŒจ\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”\", \"data\": null }"))),
examples = @ExampleObject(value = "{ \"message\": \"๊ตฌ์ง์ž ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์š”์ฒญ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒ",
content = @Content(mediaType = "application/json",
examples = {
@ExampleObject(name = "EMAIL_VERIFICATION_NEEDED", summary = "์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”",
value = "{\"message\": \"์ด๋ฉ”์ผ ์ธ์ฆ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.\", \"data\": null }"),
@ExampleObject(name = "TERMS_AGREEMENT_NEEDED", summary = "์•ฝ๊ด€ ๋™์˜ ํ•„์š”",
value = "{\"message\": \"์•ฝ๊ด€์— ๋™์˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.\", \"data\": null }"),
@ExampleObject(name = "PASSWORD_REQUIRED", summary = "๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„์š”",
value = "{\"message\": \"๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.\", \"data\": null }"),
@ExampleObject(name = "PASSWORD_MISMATCH", summary = "๋น„๋ฐ€๋ฒˆํ˜ธ ๋ถˆ์ผ์น˜",
value = "{\"message\": \"๋น„๋ฐ€๋ฒˆํ˜ธ์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ์ด ์ผ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.\", \"data\": null }")
})),
@ApiResponse(responseCode = "409", description = "์ค‘๋ณต๋œ ์ด๋ฉ”์ผ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"409\", \"message\": \"์ค‘๋ณต๋œ ์ด๋ฉ”์ผ\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "์„œ๋ฒ„ ์—๋Ÿฌ",
examples = @ExampleObject(value = "{\"message\": \"์ค‘๋ณต๋œ ์ด๋ฉ”์ผ์ž…๋‹ˆ๋‹ค.\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "๋‚ด๋ถ€ ์„œ๋ฒ„ ์—๋Ÿฌ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"500\", \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
examples = @ExampleObject(value = "{\"message\": \"๋‚ด๋ถ€ ์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
})
public ResponseEntity<GlobalApiResponse<Object>> signup(
@RequestBody @Valid UserSignupRequestDTO requestDTO) {
Expand All @@ -66,23 +72,29 @@ public ResponseEntity<GlobalApiResponse<Object>> signup(
}

@PostMapping("/cp-signup")
@Operation(summary = "๊ธฐ์—… ํšŒ์› ๊ฐ€์ž…", description = "์ƒˆ๋กœ์šด ๊ธฐ์—… ์‚ฌ์šฉ์ž๋ฅผ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์—…(ํšŒ์›) ํšŒ์›๊ฐ€์ž…์ž…๋‹ˆ๋‹ค.")
@Operation(summary = "๊ธฐ์—… ํšŒ์› ๊ฐ€์ž…", description = "์ƒˆ๋กœ์šด ๊ธฐ์—… ์‚ฌ์šฉ์ž๋ฅผ ์‹œ์Šคํ…œ์— ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฉ”์ผ ์ธ์ฆ์ด ์„ ํ–‰๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํšŒ์›๊ฐ€์ž…์‹œ 300ํฌ์ธํŠธ๊ฐ€ ์ ๋ฆฝ๋ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "๊ธฐ์—… ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"201\", \"message\": \"๊ธฐ์—… ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์‹คํŒจ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์‹คํŒจ\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”\", \"data\": null }"))),
examples = @ExampleObject(value = "{ \"message\": \"๊ธฐ์—… ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "์š”์ฒญ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜ ๋ฐœ์ƒ",
content = @Content(mediaType = "application/json",
examples = {
@ExampleObject(name = "EMAIL_VERIFICATION_NEEDED", summary = "์ด๋ฉ”์ผ ์ธ์ฆ ํ•„์š”",
value = "{\"message\": \"์ด๋ฉ”์ผ ์ธ์ฆ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.\", \"data\": null }"),
@ExampleObject(name = "TERMS_AGREEMENT_NEEDED", summary = "์•ฝ๊ด€ ๋™์˜ ํ•„์š”",
value = "{\"message\": \"์•ฝ๊ด€์— ๋™์˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.\", \"data\": null }"),
@ExampleObject(name = "PASSWORD_REQUIRED", summary = "๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ•„์š”",
value = "{\"message\": \"๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.\", \"data\": null }"),
@ExampleObject(name = "PASSWORD_MISMATCH", summary = "๋น„๋ฐ€๋ฒˆํ˜ธ ๋ถˆ์ผ์น˜",
value = "{\"message\": \"๋น„๋ฐ€๋ฒˆํ˜ธ์™€ ๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ์ด ์ผ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.\", \"data\": null }")
})),
@ApiResponse(responseCode = "409", description = "์ค‘๋ณต๋œ ์ด๋ฉ”์ผ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"409\", \"message\": \"์ค‘๋ณต๋œ ์ด๋ฉ”์ผ\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "์„œ๋ฒ„ ์—๋Ÿฌ",
examples = @ExampleObject(value = "{\"message\": \"์ค‘๋ณต๋œ ์ด๋ฉ”์ผ์ž…๋‹ˆ๋‹ค.\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "๋‚ด๋ถ€ ์„œ๋ฒ„ ์—๋Ÿฌ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"500\", \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
examples = @ExampleObject(value = "{\"message\": \"๋‚ด๋ถ€ ์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
})
public ResponseEntity<GlobalApiResponse<Object>> signupCompany(
@RequestBody @Valid CpUserSignupRequestDTO requestDTO) {
Expand All @@ -98,17 +110,17 @@ public ResponseEntity<GlobalApiResponse<Object>> signupCompany(
}

@PostMapping("/login")
@Operation(summary = "๊ตฌ์ง์ž ๋กœ๊ทธ์ธ", description = "์‚ฌ์šฉ์ž๊ฐ€ ์ด๋ฉ”์ผ๋กœ ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.")
@Operation(summary = "๊ตฌ์ง์ž(์‚ฌ์šฉ์ž) ๋กœ๊ทธ์ธ", description = "์‚ฌ์šฉ์ž๊ฐ€ ์ด๋ฉ”์ผ๋กœ ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ฐ˜ ๋กœ๊ทธ์ธ์ž…๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋กœ๊ทธ์ธ ์„ฑ๊ณต",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"200\", \"message\": \"๋กœ๊ทธ์ธ ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "๋กœ๊ทธ์ธ ์‹คํŒจ",
examples = @ExampleObject(value = "{ \"message\": \"๋กœ๊ทธ์ธ ์„ฑ๊ณต\", \"data\": {\"userId\": 1, \"username\": \"๊น€์€์ฑ„\", \"nickname\": \"๋Œ€๊ตฌ์ด์žก์ด\", \"email\": \"[email protected]\", \"phoneNumber\": null, \"loginType\": \"NORMAL\"} }"))),
@ApiResponse(responseCode = "404", description = "๋ฏธ์กด์žฌ ์‚ฌ์šฉ์ž",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"๋กœ๊ทธ์ธ ์‹คํŒจ\", \"data\": null }"))),
examples = @ExampleObject(value = "{\"message\": \"์‚ฌ์šฉ์ž๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "์„œ๋ฒ„ ์—๋Ÿฌ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"500\", \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
examples = @ExampleObject(value = "{ \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
})
public ResponseEntity<GlobalApiResponse<UserLoginResponseDTO>> login(
@RequestBody @Valid UserLoginRequestDTO requestDTO) {
Expand All @@ -129,13 +141,13 @@ public ResponseEntity<GlobalApiResponse<UserLoginResponseDTO>> login(
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋กœ๊ทธ์ธ ์„ฑ๊ณต",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"200\", \"message\": \"๋กœ๊ทธ์ธ ์„ฑ๊ณต\", \"data\": null }"))),
@ApiResponse(responseCode = "400", description = "๋กœ๊ทธ์ธ ์‹คํŒจ",
examples = @ExampleObject(value = "{ \"message\": \"๋กœ๊ทธ์ธ ์„ฑ๊ณต\", \"data\": {\"cpUserId\": 1, \"cpUsername\": \"๊น€๊ณ ์–‘์ด\", \"cpName\": \"๊ณ ์–‘์ดํƒ•ํ›„๋ฃจ\", \"cpEmail\": \"[email protected]\", \"cpPhoneNumber\": \"01012345678\", \"hiringStatus\": true, \"employeeCount\": 10} }"))),
@ApiResponse(responseCode = "404", description = "๋ฏธ์กด์žฌ ์‚ฌ์šฉ์ž",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"400\", \"message\": \"๋กœ๊ทธ์ธ ์‹คํŒจ\", \"data\": null }"))),
examples = @ExampleObject(value = "{\"message\": \"๊ธฐ์—…(ํšŒ์›)์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.\", \"data\": null }"))),
@ApiResponse(responseCode = "500", description = "์„œ๋ฒ„ ์—๋Ÿฌ",
content = @Content(mediaType = "application/json",
examples = @ExampleObject(value = "{ \"code\": \"500\", \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
examples = @ExampleObject(value = "{ \"message\": \"์„œ๋ฒ„ ์—๋Ÿฌ\", \"data\": null }")))
})
public ResponseEntity<GlobalApiResponse<CompanyUserLoginResponseDTO>> cpLogin(
@RequestBody @Valid CompanyUserLoginRequestDTO requestDTO) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package team9502.sinchulgwinong.domain.auth.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AccessLevel;
import lombok.Builder;
Expand All @@ -10,9 +11,11 @@
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class CompanyUserLoginRequestDTO {

@Schema(description = "์ด๋ฉ”์ผ", example = "[email protected]")
@NotBlank(message = "ํ•„์ˆ˜ ์ž…๋ ฅ์ž…๋‹ˆ๋‹ค.")
private String cpEmail;

@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ", example = "Password1!")
@NotBlank(message = "ํ•„์ˆ˜ ์ž…๋ ฅ์ž…๋‹ˆ๋‹ค.")
private String cpPassword;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Getter;
import lombok.NoArgsConstructor;

Expand Down Expand Up @@ -40,15 +41,18 @@ public class CpUserSignupRequestDTO {
private String cpUsername;

@NotBlank(message = "ํšŒ์‚ฌ ์ด๋ฉ”์ผ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^[a-zA-Z0-9]+@[a-zA-Z0-9]+(\\.[a-zA-Z]{2,})+$", message = "์œ ํšจํ•œ ์ด๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Schema(description = "ํšŒ์‚ฌ ์ด๋ฉ”์ผ", example = "[email protected]")
private String cpEmail;

@NotBlank(message = "ํšŒ์‚ฌ ์ „ํ™”๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Schema(description = "ํšŒ์‚ฌ ์ „ํ™”๋ฒˆํ˜ธ", example = "01012345678")
private String cpPhoneNumber;

@NotBlank(message = "ํšŒ์‚ฌ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Schema(description = "ํšŒ์‚ฌ ๋น„๋ฐ€๋ฒˆํ˜ธ", example = "password")
@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$"
, message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ์ตœ์†Œ 8์ž๋ฆฌ์ด๋ฉฐ, ์•ŒํŒŒ๋ฒณ, ์ˆซ์ž, ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.")
@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ", example = "password")
private String cpPassword;

@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package team9502.sinchulgwinong.domain.auth.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AccessLevel;
import lombok.Builder;
Expand All @@ -10,9 +11,11 @@
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class UserLoginRequestDTO {

@Schema(description = "์ด๋ฉ”์ผ", example = "[email protected]")
@NotBlank(message = "ํ•„์ˆ˜ ์ž…๋ ฅ์ž…๋‹ˆ๋‹ค.")
private String email;

@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ", example = "Password1!")
@NotBlank(message = "ํ•„์ˆ˜ ์ž…๋ ฅ์ž…๋‹ˆ๋‹ค.")
private String password;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import team9502.sinchulgwinong.domain.user.enums.LoginType;
import team9502.sinchulgwinong.domain.oauth.enums.SocialType;

@Getter
@NoArgsConstructor
Expand All @@ -20,23 +21,26 @@ public class UserSignupRequestDTO {
private String nickname;

@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[@$!%?&])[A-Za-z\\d@$!%*?&]{8,}$",
message = "๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ์ตœ์†Œ 8์ž๋ฆฌ์ด๋ฉฐ, ์•ŒํŒŒ๋ฒณ, ์ˆซ์ž, ํŠน์ˆ˜๋ฌธ์ž๋ฅผ ํฌํ•จํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.")
@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ", example = "password")
private String password;

@NotBlank(message = "๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ", example = "password")
@Schema(description = "๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธ", example = "Password1!")
private String confirmPassword;

@NotBlank(message = "์ด๋ฉ”์ผ์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Pattern(regexp = "^[a-zA-Z0-9]+@[a-zA-Z0-9]+(\\.[a-zA-Z]{2,})+$", message = "์œ ํšจํ•œ ์ด๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.")
@Schema(description = "์ด๋ฉ”์ผ ์ฃผ์†Œ", example = "[email protected]")
private String email;

@Schema(description = "์ „ํ™”๋ฒˆํ˜ธ", example = "01012345678")
private String phoneNumber;

@Schema(description = "๋กœ๊ทธ์ธ ์œ ํ˜•", example = "EMAIL")
private LoginType loginType;

@Schema(description = "์•ฝ๊ด€ ๋™์˜ ์—ฌ๋ถ€", example = "true")
private boolean agreeToTerms;

@Schema(description = "๋กœ๊ทธ์ธ ํƒ€์ž…", example = "GOOGLE")
private SocialType loginType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import team9502.sinchulgwinong.domain.user.enums.LoginType;
import team9502.sinchulgwinong.domain.oauth.enums.SocialType;

@Getter
@NoArgsConstructor
Expand All @@ -20,5 +20,5 @@ public class UserLoginResponseDTO {

private String phoneNumber;

private LoginType loginType;
private SocialType loginType;
}
Loading

0 comments on commit 129ef34

Please sign in to comment.