Co-authored-by: LQ63 <lkhermann@web.de> Reviewed-on: #82 Co-authored-by: Janis <janis.e.20@gmx.de> Co-committed-by: Janis <janis.e.20@gmx.de>
21 lines
408 B
Scala
21 lines
408 B
Scala
package model.users
|
|
|
|
import java.util.UUID
|
|
|
|
case class User(
|
|
internalId: Long,
|
|
id: UUID,
|
|
name: String,
|
|
passwordHash: String
|
|
) {
|
|
|
|
def withName(newName: String): User = {
|
|
this.copy(name = newName)
|
|
}
|
|
|
|
private def withPasswordHash(newPasswordHash: String): User = {
|
|
this.copy(passwordHash = newPasswordHash)
|
|
}
|
|
|
|
}
|