aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala
diff options
context:
space:
mode:
authorVyatcheslav Suharnikov <arz.freezy@gmail.com>2017-07-13 05:55:28 +0300
committerGitHub <noreply@github.com>2017-07-13 05:55:28 +0300
commit3d902b5197db861c30325c159dc10cfb211ae209 (patch)
treed95187e353f2b03644ec02d8a92711ce9ec69efb /src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala
parent7ab16021fe2b7e1f7d9d7800458e737d015e7630 (diff)
parente2313321736520e6acaeb9aaa6ab426e6a8415ff (diff)
downloadrest-query-3d902b5197db861c30325c159dc10cfb211ae209.tar.gz
rest-query-3d902b5197db861c30325c159dc10cfb211ae209.tar.bz2
rest-query-3d902b5197db861c30325c159dc10cfb211ae209.zip
Merge pull request #6 from drivergroup/PDSUI-2018v0.1.24
PDSUI-2018 Change user type from LongId to StringId
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala
index 4abb205..9be26b9 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/entities/UserHistory.scala
@@ -7,7 +7,7 @@ import xyz.driver.pdsuicommon.logging._
import xyz.driver.pdsuicommon.utils.Utils
final case class UserHistory(id: LongId[UserHistory],
- executor: LongId[User],
+ executor: StringId[User],
recordId: Option[LongId[MedicalRecord]] = None,
documentId: Option[LongId[Document]] = None,
trialId: Option[StringId[Trial]] = None,
@@ -18,7 +18,7 @@ final case class UserHistory(id: LongId[UserHistory],
object UserHistory {
- def forDocument(executor: LongId[User],
+ def forDocument(executor: StringId[User],
documentId: LongId[Document],
state: UserHistory.State,
action: UserHistory.Action): UserHistory = UserHistory(
@@ -29,7 +29,7 @@ object UserHistory {
action = action
)
- def forRecord(executor: LongId[User],
+ def forRecord(executor: StringId[User],
recordId: LongId[MedicalRecord],
state: UserHistory.State,
action: UserHistory.Action): UserHistory = UserHistory(
@@ -40,18 +40,7 @@ object UserHistory {
action = action
)
- def forTrial(executor: LongId[User],
- trialId: StringId[Trial],
- state: UserHistory.State,
- action: UserHistory.Action): UserHistory = UserHistory(
- id = LongId(0L),
- executor = executor,
- trialId = Some(trialId),
- state = state,
- action = action
- )
-
- def forPatient(executor: LongId[User],
+ def forPatient(executor: StringId[User],
patientId: UuidId[Patient],
state: UserHistory.State,
action: UserHistory.Action): UserHistory = UserHistory(