diff options
author | Jakob Odersky <jakob@driver.xyz> | 2017-07-05 19:02:13 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@driver.xyz> | 2017-07-12 21:04:25 -0700 |
commit | f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe (patch) | |
tree | 9e26568fe6598074a6de8815b465cbfc7ff69b7c /src/main/scala/xyz/driver/pdsuicommon/domain | |
parent | 3d902b5197db861c30325c159dc10cfb211ae209 (diff) | |
download | rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.tar.gz rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.tar.bz2 rest-query-f9ac0adf5c3bcfcde03bd3ea2bc2471b0d0f99fe.zip |
Implement REST services for trial curation
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 | 14 |
2 files changed, 11 insertions, 11 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 8d2d86d..4920176 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/domain/User.scala @@ -8,13 +8,13 @@ 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, - role: Role, - passwordHash: PasswordHash, - latestActivity: Option[LocalDateTime], - deleted: Option[LocalDateTime]) +final case class User(id: StringId[User], + email: Email, + name: String, + role: Role, + passwordHash: PasswordHash, + latestActivity: Option[LocalDateTime], + deleted: Option[LocalDateTime]) object User { |