forked from folio-org/mod-circulation-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loan.json
148 lines (148 loc) · 5.74 KB
/
loan.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Loan",
"description": "Links the item with the patron and applies certain conditions based on policies",
"properties": {
"id": {
"description": "Unique ID (generated UUID) of the loan",
"type": "string"
},
"userId": {
"description": "ID of the patron the item was lent to. Required for open loans, not required for closed loans (for anonymization).",
"type": "string"
},
"proxyUserId": {
"description": "ID of the user representing a proxy for the patron",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"itemId": {
"description": "ID of the item lent to the patron",
"type": "string"
},
"itemEffectiveLocationIdAtCheckOut": {
"description": "The effective location, at the time of checkout, of the item loaned to the patron.",
"type": "string",
"$ref": "raml-util/schemas/uuid.schema"
},
"status": {
"description": "Overall status of the loan",
"type": "object",
"properties": {
"name": {
"description": "Name of the status (currently can be any value, values commonly used are Open and Closed)",
"type": "string"
}
},
"additionalProperties": false
},
"loanDate": {
"description": "Date time when the loan began (typically represented according to rfc3339 section-5.6. Has not had the date-time format validation applied as was not supported at point of introduction and would now be a breaking change)",
"type": "string"
},
"dueDate": {
"description": "Date time when the item is due to be returned",
"type": "string",
"format": "date-time"
},
"returnDate": {
"description": "Date time when the item is returned and the loan ends (typically represented according to rfc3339 section-5.6. Has not had the date-time format validation applied as was not supported at point of introduction and would now be a breaking change)",
"type": "string"
},
"systemReturnDate" : {
"description": "Date time when the returned item is actually processed",
"type": "string",
"format": "date-time"
},
"action": {
"description": "Last action performed on a loan (currently can be any value, values commonly used are checkedout and checkedin)",
"type": "string"
},
"actionComment": {
"description": "Comment to last action performed on a loan",
"type": "string"
},
"itemStatus": {
"description": "Last item status used in relation to this loan (currently can be any value, values commonly used are Checked out and Available)",
"type": "string"
},
"renewalCount": {
"description": "Count of how many times a loan has been renewed (incremented by the client)",
"type": "integer"
},
"loanPolicyId": {
"description": "ID of last policy used in relation to this loan",
"type": "string"
},
"checkoutServicePointId": {
"description": "ID of the Service Point where the last checkout occured",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"type": "string"
},
"checkinServicePointId": {
"description": "ID of the Service Point where the last checkin occured",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"type": "string"
},
"patronGroupIdAtCheckout": {
"description": "Patron Group Id at checkout",
"type": "string"
},
"dueDateChangedByRecall": {
"description": "Indicates whether or not this loan had its due date modified by a recall on the loaned item",
"type": "boolean"
},
"declaredLostDate" : {
"description": "Date and time the item was declared lost during this loan",
"type": "string",
"format": "date-time"
},
"claimedReturnedDate": {
"description": "Date and time the item was claimed returned for this loan",
"type": "string",
"format": "date-time"
},
"overdueFinePolicyId": {
"description": "ID of overdue fines policy at the time the item is check-in or renewed",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"type": "string"
},
"lostItemPolicyId": {
"description": "ID of lost item policy which determines when the item ages to lost and the associated fees or the associated fees if the patron declares the item lost.",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
"type": "string"
},
"metadata": {
"description": "Metadata about creation and changes to loan, provided by the server (client should not provide)",
"type": "object",
"$ref": "raml-util/schemas/metadata.schema"
},
"agedToLostDelayedBilling": {
"description": "Aged to Lost Delayed Billing processing",
"type": "object",
"properties": {
"lostItemHasBeenBilled": {
"description": "Indicates if the aged to lost fee has been billed (for use where delayed billing is set up)",
"type": "boolean"
},
"dateLostItemShouldBeBilled": {
"description": "Indicates when the aged to lost fee should be billed (for use where delayed billing is set up)",
"type": "string",
"format": "date-time"
},
"agedToLostDate": {
"description": "Date and time the item was aged to lost for this loan",
"type": "string",
"format": "date-time"
}
}
}
},
"additionalProperties": false,
"required": [
"itemId",
"loanDate",
"action"
]
}