Skip to content

Commit

Permalink
refactor: (#301) Range Validation 제거 & 핸들링 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
khcho0125 committed Jan 23, 2023
1 parent 083882c commit e0ae7c9
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package team.comit.simtong.domain.admin.dto

import org.hibernate.validator.constraints.Range
import team.comit.simtong.domain.user.dto.request.AdminSignInData
import team.comit.simtong.domain.user.model.EmployeeNumber
import javax.validation.constraints.NotBlank
import javax.validation.constraints.NotNull

/**
*
Expand All @@ -16,15 +15,15 @@ import javax.validation.constraints.NotBlank
**/
data class AdminSignInRequest(

@field:Range(min = EmployeeNumber.MIN_VALUE, max = EmployeeNumber.MAX_VALUE)
val employeeNumber: Int,
@field:NotNull
val employeeNumber: Int?,

@field:NotBlank
val password: String
val password: String?
) {

fun toData() = AdminSignInData(
employeeNumber = employeeNumber,
password = password
employeeNumber = employeeNumber!!,
password = password!!
)
}

0 comments on commit e0ae7c9

Please sign in to comment.