aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/entities/MedicalRecordIssue.scala
blob: c7689584d2cbe86b585e6df4bd4c3308e66c9494 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package xyz.driver.pdsuidomain.entities

import java.time.LocalDateTime

import xyz.driver.core.auth.User
import xyz.driver.pdsuicommon.domain.{LongId, StringId}
import xyz.driver.pdsuicommon.logging._

final case class MedicalRecordIssue(id: LongId[MedicalRecordIssue],
                                    userId: StringId[User],
                                    recordId: LongId[MedicalRecord],
                                    startPage: Option[Double],
                                    endPage: Option[Double],
                                    lastUpdate: LocalDateTime,
                                    isDraft: Boolean,
                                    text: String,
                                    archiveRequired: Boolean)

object MedicalRecordIssue {
  implicit def toPhiString(x: MedicalRecordIssue): PhiString = {
    import x._
    phi"MedicalRecordIssue(id=$id, userId=$userId, recordId=$recordId)"
  }
}