generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added OpenAPI schema to contact restrictions
- Loading branch information
1 parent
52a2048
commit 94373c4
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...gov/justice/digital/hmpps/hmppsintegrationapi/models/hmpps/PrisonerContactRestrictions.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,20 +1,35 @@ | ||
package uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class PrisonerContactRestrictions( | ||
@Schema(description = "Relationship specific restrictions") | ||
var prisonerContactRestrictions: List<ContactRestriction>? = emptyList(), | ||
@Schema(description = "Global (estate-wide) restrictions for the contact") | ||
var contactGlobalRestrictions: List<ContactRestriction>? = emptyList(), | ||
) | ||
|
||
data class ContactRestriction( | ||
@Schema(description = "The restriction code", examples = ["CC", "BAN", "CHILD", "CLOSED", "RESTRICTED", "DIHCON", "NONCON"]) | ||
val restrictionType: String, | ||
@Schema(description = "The description of the restriction type", example = "Banned") | ||
val restrictionTypeDescription: String, | ||
@Schema(description = "Restriction created date", example = "2024-01-01") | ||
val startDate: String, | ||
@Schema(description = "Restriction expiry date", example = "2024-01-01") | ||
val expiryDate: String, | ||
@Schema(description = "Comments for the restriction", example = "N/A") | ||
val comments: String, | ||
@Schema(description = "The username of either the person who created the restriction or the last person to update it if it has been modified", example = "admin") | ||
val enteredByUsername: String, | ||
@Schema(description = "The display name of either the person who created the restriction or the last person to update it if it has been modified", example = "John Smith") | ||
val enteredByDisplayName: String, | ||
@Schema(description = "User who created the entry", example = "admin") | ||
val createdBy: String, | ||
@Schema(description = "Timestamp when the entry was created", example = "2023-09-23T10:15:30") | ||
val createdTime: String, | ||
@Schema(description = "User who updated the entry", example = "admin") | ||
val updatedBy: String, | ||
@Schema(description = "Timestamp when the entry was updated", example = "2023-09-23T10:15:30") | ||
val updatedTime: String, | ||
) |