Skip to content

Commit

Permalink
PI-2632 Add ids to the offence response (#4426)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl authored Nov 13, 2024
1 parent b1fe5a1 commit 2d90979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ data class MappaDetail(
)

data class Offence(
val id: Long,
val code: String,
val description: String,
val date: LocalDate?,
val main: Boolean,
val eventId: Long,
val eventNumber: String
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fun CommunityManager.team() = Team(
team.endDate
)

fun CaseOffence.asOffence() = Offence(code, description, date, main, eventNumber)
fun CaseOffence.asOffence() = Offence(id, code, description, date, main, eventId, eventNumber)

fun Registration.asRegistration() = uk.gov.justice.digital.hmpps.model.Registration(type.code, type.description, date)
fun Registration.asMappa() = MappaDetail(
Expand Down

0 comments on commit 2d90979

Please sign in to comment.