Skip to content

Commit

Permalink
[Feat]: test
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Sep 24, 2024
1 parent 9fce915 commit cb29043
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/kotlin/com/reditus/novelcia/user/domain/UserModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UserModel(
val nickname: String,
val point: Int,
val memberShipExpiredAt: LocalDateTime,
val role: Role,
val role: Role=Role.USER
) {
companion object {
fun from(user: User): TxScope.() -> UserModel = {
Expand All @@ -19,7 +19,16 @@ class UserModel(
nickname = user.nickname,
point = user.point,
memberShipExpiredAt = user.memberShipExpiredAt,
role = user.role
)
}
fun from(user: User, role: Role): TxScope.() -> UserModel = {
UserModel(
id = user.id,
email = user.email,
nickname = user.nickname,
point = user.point,
memberShipExpiredAt = user.memberShipExpiredAt,
role = role
)
}
}
Expand Down

0 comments on commit cb29043

Please sign in to comment.