Commit 163d39c 1 parent a68ae30 commit 163d39c Copy full SHA for 163d39c
File tree 3 files changed +8
-3
lines changed
src/main/kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/models
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ package uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps
3
3
import java.time.LocalDate
4
4
5
5
data class Sentence (
6
- val dataSource : UpstreamApi ,
6
+ val serviceSource : UpstreamApi ,
7
+ val systemSource : SystemSource ,
7
8
val dateOfSentencing : LocalDate ? = null ,
8
9
val description : String? = null ,
9
10
val isActive : Boolean? = null ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.ndelius
2
2
3
3
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.Offence
4
4
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.Sentence
5
+ import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.SystemSource
5
6
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.UpstreamApi
6
7
import java.time.LocalDate
7
8
import java.time.format.DateTimeFormatter
@@ -21,7 +22,8 @@ data class NDeliusSupervision(
21
22
22
23
fun toSentence (): Sentence {
23
24
return Sentence (
24
- dataSource = UpstreamApi .NDELIUS ,
25
+ serviceSource = UpstreamApi .NDELIUS ,
26
+ systemSource = SystemSource .PROBATION_SYSTEMS ,
25
27
dateOfSentencing = if (! this .sentence.date.isNullOrEmpty()) LocalDate .parse(this .sentence.date) else null ,
26
28
description = this .sentence.description,
27
29
fineAmount = null ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.nomis
2
2
3
3
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.Sentence
4
4
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.SentenceLength
5
+ import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.SystemSource
5
6
import uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps.UpstreamApi
6
7
import java.time.LocalDate
7
8
@@ -13,7 +14,8 @@ data class NomisSentence(
13
14
val terms : List <NomisTerm > = listOf(NomisTerm ()),
14
15
) {
15
16
fun toSentence (): Sentence = Sentence (
16
- dataSource = UpstreamApi .NOMIS ,
17
+ serviceSource = UpstreamApi .NOMIS ,
18
+ systemSource = SystemSource .PRISON_SYSTEMS ,
17
19
dateOfSentencing = this .sentenceDate,
18
20
description = this .sentenceTypeDescription,
19
21
fineAmount = this .fineAmount,
You can’t perform that action at this time.
0 commit comments