|
1 | 1 | package uk.gov.justice.digital.hmpps.hmppsintegrationapi.models.hmpps
|
2 | 2 |
|
3 |
| -import com.fasterxml.jackson.annotation.JsonProperty |
| 3 | +import io.swagger.v3.oas.annotations.media.Schema |
4 | 4 |
|
5 | 5 | data class PrisonerContactRestrictions(
|
6 |
| - var prisonerContactRestrictions: List<PrisonerContactRestriction>? = emptyList(), |
7 |
| - var contactGlobalRestrictions: List<ContactGlobalRestriction>? = emptyList(), |
| 6 | + @Schema(description = "Relationship specific restrictions") |
| 7 | + var prisonerContactRestrictions: List<ContactRestriction>, |
| 8 | + @Schema(description = "Global (estate-wide) restrictions for the contact") |
| 9 | + var contactGlobalRestrictions: List<ContactRestriction>, |
8 | 10 | )
|
9 | 11 |
|
10 |
| -data class PrisonerContactRestriction( |
11 |
| - val prisonerContactRestrictionId: Long, |
12 |
| - val prisonerContactId: Long, |
13 |
| - val contactId: Long, |
14 |
| - val prisonerNumber: String, |
| 12 | +data class ContactRestriction( |
| 13 | + @Schema(description = "The restriction code", examples = ["CC", "BAN", "CHILD", "CLOSED", "RESTRICTED", "DIHCON", "NONCON"]) |
15 | 14 | val restrictionType: String,
|
| 15 | + @Schema(description = "The description of the restriction type", example = "Banned") |
16 | 16 | val restrictionTypeDescription: String,
|
| 17 | + @Schema(description = "Restriction created date", example = "2024-01-01") |
17 | 18 | val startDate: String,
|
| 19 | + @Schema(description = "Restriction expiry date", example = "2024-01-01") |
18 | 20 | val expiryDate: String,
|
| 21 | + @Schema(description = "Comments for the restriction", example = "N/A") |
19 | 22 | val comments: String,
|
| 23 | + @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") |
20 | 24 | val enteredByUsername: String,
|
| 25 | + @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") |
21 | 26 | val enteredByDisplayName: String,
|
| 27 | + @Schema(description = "User who created the entry", example = "admin") |
22 | 28 | val createdBy: String,
|
| 29 | + @Schema(description = "Timestamp when the entry was created", example = "2023-09-23T10:15:30") |
23 | 30 | val createdTime: String,
|
| 31 | + @Schema(description = "User who updated the entry", example = "admin") |
24 | 32 | val updatedBy: String,
|
25 |
| - val updatedTime: String, |
26 |
| -) |
27 |
| - |
28 |
| -data class ContactGlobalRestriction( |
29 |
| - @JsonProperty("contactRestrictionId") |
30 |
| - val contactRestrictionId: Long, |
31 |
| - @JsonProperty("contactId") |
32 |
| - val contactId: Long, |
33 |
| - @JsonProperty("restrictionType") |
34 |
| - val restrictionType: String, |
35 |
| - @JsonProperty("restrictionTypeDescription") |
36 |
| - val restrictionTypeDescription: String, |
37 |
| - @JsonProperty("startDate") |
38 |
| - val startDate: String, |
39 |
| - @JsonProperty("expiryDate") |
40 |
| - val expiryDate: String, |
41 |
| - @JsonProperty("comments") |
42 |
| - val comments: String, |
43 |
| - @JsonProperty("enteredByUsername") |
44 |
| - val enteredByUsername: String, |
45 |
| - @JsonProperty("enteredByDisplayName") |
46 |
| - val enteredByDisplayName: String, |
47 |
| - @JsonProperty("createdBy") |
48 |
| - val createdBy: String, |
49 |
| - @JsonProperty("createdTime") |
50 |
| - val createdTime: String, |
51 |
| - @JsonProperty("updatedBy") |
52 |
| - val updatedBy: String, |
53 |
| - @JsonProperty("updatedTime") |
| 33 | + @Schema(description = "Timestamp when the entry was updated", example = "2023-09-23T10:15:30") |
54 | 34 | val updatedTime: String,
|
55 | 35 | )
|
0 commit comments