generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adiing createdBy, date format in app response
- Loading branch information
1 parent
c5d5106
commit ba738cf
Showing
14 changed files
with
52 additions
and
97 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/main/kotlin/uk/gov/justice/digital/hmpps/managingprisonerappsapi/dto/AppRequestDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package uk.gov.justice.digital.hmpps.managingprisonerappsapi.dto | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat | ||
import java.time.LocalDateTime | ||
|
||
data class AppRequestDto( | ||
val reference: String, | ||
val type: String, | ||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") | ||
val requestedDate: LocalDateTime, | ||
val requests: List<Map<String, Any>>, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 3 additions & 18 deletions
21
src/main/kotlin/uk/gov/justice/digital/hmpps/managingprisonerappsapi/model/Prisoner.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,11 @@ | ||
package uk.gov.justice.digital.hmpps.managingprisonerappsapi.model | ||
|
||
import jakarta.persistence.Entity | ||
import jakarta.persistence.Id | ||
|
||
@Entity | ||
data class Prisoner( | ||
@Id | ||
val id: String, | ||
val username: String, | ||
val userId: String, | ||
val firstName: String, | ||
val lastName: String, | ||
val category: UserCategory, | ||
val location: String, | ||
val iep: String, | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as Prisoner | ||
|
||
return id == other.id | ||
} | ||
|
||
override fun hashCode(): Int = id.hashCode() | ||
} | ||
) |
22 changes: 3 additions & 19 deletions
22
src/main/kotlin/uk/gov/justice/digital/hmpps/managingprisonerappsapi/model/Staff.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,13 @@ | ||
package uk.gov.justice.digital.hmpps.managingprisonerappsapi.model | ||
|
||
import jakarta.persistence.ElementCollection | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.Id | ||
import java.util.* | ||
|
||
@Entity | ||
data class Staff( | ||
@Id | ||
val id: UUID, | ||
val username: String, | ||
val userId: String, | ||
val firstName: String, | ||
val lastName: String, | ||
val category: UserCategory, | ||
@ElementCollection | ||
val roles: Set<UUID>, | ||
val jobTitle: String, | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as Staff | ||
|
||
return id == other.id | ||
} | ||
|
||
override fun hashCode(): Int = id.hashCode() | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
...kotlin/uk/gov/justice/digital/hmpps/managingprisonerappsapi/repository/StaffRepository.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
...in/uk/gov/justice/digital/hmpps/managingprisonerappsapi/repository/StaffRepositoryTest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters