Files
KnockOutWhist-Web/knockoutwhistweb/app/model/users/User.scala
LQ63 e0f16a224d feat(ui): Websocket
Started implementing functionality to Websocket.
2025-11-27 08:00:30 +01:00

24 lines
524 B
Scala

package model.users
import play.api.libs.json.{Format, Json}
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)
}
}
object User {
implicit val userFormat: Format[User] = Json.format[User]
}