aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala b/src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala
new file mode 100644
index 0000000..38e442b
--- /dev/null
+++ b/src/main/scala/xyz/driver/pdsuicommon/synchronization/domain/FakeId.scala
@@ -0,0 +1,14 @@
+package xyz.driver.pdsuicommon.synchronization.domain
+
+/*
+ It is like an Id for entities those haven't an Id, but should be unique.
+ For example,
+ RawArm has the name, the kind and the intervention fields.
+ It has not an Id, but should be identified by the name field.
+ So, the name field is a fake id for RawArm.
+ */
+final case class FakeId(value: String)
+
+object FakeId {
+ implicit val ordering: Ordering[FakeId] = Ordering.by(_.value)
+}