Skip to content

Commit

Permalink
MAN-28 - refactor attribute names (#4340)
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj authored Oct 24, 2024
1 parent 08a75c6 commit 76b245f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class LicenceConditionIntegrationTest {
LIC_COND_SUB_CAT.description,
LocalDate.now().minusDays(7),
LocalDate.now(),
note = LicenceConditionNote(
licenceConditionNote = LicenceConditionNote(
0,
"CVL Service",
LocalDate.of(2024, 4, 22),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class SentenceIntegrationTest {
LC_WITHOUT_NOTES.id,
LIC_COND_MAIN_CAT.description,
imposedReleasedDate = LocalDate.now().minusDays(14),
notes = listOf()
licenceConditionNotes = listOf()
),
LicenceCondition(
LC_WITH_NOTES_WITHOUT_ADDED_BY.id,
Expand All @@ -167,7 +167,7 @@ class SentenceIntegrationTest {
LicenceConditionNote(
0,
note = "He shall not contact or associate with Peter Jones without the prior approval of the supervising officer;",
hasNotesBeenTruncated = false
hasNoteBeenTruncated = false
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ data class LicenceCondition(
val subTypeDescription: String? = null,
val imposedReleasedDate: LocalDate,
val actualStartDate: LocalDate? = null,
val notes: List<LicenceConditionNote>? = null,
val note: LicenceConditionNote? = null
val licenceConditionNotes: List<LicenceConditionNote>? = null,
val licenceConditionNote: LicenceConditionNote? = null
)

data class LicenceConditionNote(
val id: Int,
val createdBy: String? = null,
val createdByDate: LocalDate? = null,
val note: String,
val hasNotesBeenTruncated: Boolean? = null
val hasNoteBeenTruncated: Boolean? = null
)

data class LicenceConditionNoteDetail(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fun EntityLicenceCondition.toLicenceConditionSingleNote(noteId: Int, truncateNot
subCategory?.description,
imposedReleasedDate,
actualStartDate,
note = toLicenceConditionNote(truncateNote).elementAtOrNull(noteId)
licenceConditionNote = toLicenceConditionNote(truncateNote).elementAtOrNull(noteId)
)

fun EntityLicenceCondition.toLicenceConditionNote(truncateNote: Boolean): List<LicenceConditionNote> {
Expand Down

0 comments on commit 76b245f

Please sign in to comment.