Skip to content

Commit

Permalink
add: (#25) CheckEmployeePort
Browse files Browse the repository at this point in the history
  • Loading branch information
khcho0125 committed Sep 7, 2022
1 parent c98208e commit 2eaaf9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import team.comit.simtong.domain.user.dto.DomainSignUpRequest
import team.comit.simtong.domain.user.model.Authority
import team.comit.simtong.domain.user.model.User
import team.comit.simtong.domain.user.spi.CheckEmailPort
import team.comit.simtong.domain.user.spi.CheckEmployeePort
import team.comit.simtong.domain.user.spi.NickNamePort
import team.comit.simtong.domain.user.spi.SecurityPort

Expand All @@ -18,6 +19,7 @@ import team.comit.simtong.domain.user.spi.SecurityPort
**/
@Component
class SignUpPolicy(
private val checkEmployeePort: CheckEmployeePort,
private val checkEmailPort: CheckEmailPort,
private val randomNamePort: NickNamePort,
private val securityPort: SecurityPort
Expand All @@ -28,7 +30,7 @@ class SignUpPolicy(
checkEmailPort.checkCertifiedEmail(request.email)
checkEmailPort.checkUsedEmail(request.email)

// TODO name & employeeNumber 확인 로직
checkEmployeePort.checkList(request.name, request.employeeNumber)

return User(
id = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package team.comit.simtong.domain.user.spi

interface CheckEmployeePort {

fun checkList(name: String, employeeNumber: Int)
}

0 comments on commit 2eaaf9e

Please sign in to comment.