diff options
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/domain')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/domain/Id.scala | 8 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/domain/User.scala | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/domain/Id.scala b/src/main/scala/xyz/driver/pdsuicommon/domain/Id.scala index 1bb70f8..e238245 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/domain/Id.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/domain/Id.scala @@ -6,9 +6,9 @@ import xyz.driver.pdsuicommon.logging._ sealed trait Id[+T] -case class CompoundId[Id1 <: Id[_], Id2 <: Id[_]](part1: Id1, part2: Id2) extends Id[(Id1, Id2)] +final case class CompoundId[Id1 <: Id[_], Id2 <: Id[_]](part1: Id1, part2: Id2) extends Id[(Id1, Id2)] -case class LongId[+T](id: Long) extends Id[T] { +final case class LongId[+T](id: Long) extends Id[T] { override def toString: String = id.toString def is(longId: Long): Boolean = { @@ -20,7 +20,7 @@ object LongId { implicit def toPhiString[T](x: LongId[T]): PhiString = Unsafe(s"LongId(${x.id})") } -case class StringId[+T](id: String) extends Id[T] { +final case class StringId[+T](id: String) extends Id[T] { override def toString: String = id def is(stringId: String): Boolean = { @@ -32,7 +32,7 @@ object StringId { implicit def toPhiString[T](x: StringId[T]): PhiString = Unsafe(s"StringId(${x.id})") } -case class UuidId[+T](id: UUID) extends Id[T] { +final case class UuidId[+T](id: UUID) extends Id[T] { override def toString: String = id.toString } diff --git a/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala b/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala index b400a71..654af1a 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala @@ -8,12 +8,12 @@ import xyz.driver.pdsuicommon.logging._ import xyz.driver.pdsuicommon.domain.User.Role import xyz.driver.pdsuicommon.utils.Utils -case class User(id: StringId[User], - email: Email, - name: String, - roles: Set[Role], - latestActivity: Option[LocalDateTime], - deleted: Option[LocalDateTime]) { +final case class User(id: StringId[User], + email: Email, + name: String, + roles: Set[Role], + latestActivity: Option[LocalDateTime], + deleted: Option[LocalDateTime]) { def this(driverUser: xyz.driver.entities.users.UserInfo) { this( |