Lines 25-484
__PACKAGE__->table("reserves");
Link Here
|
25 |
|
25 |
|
26 |
=head2 reserve_id |
26 |
=head2 reserve_id |
27 |
|
27 |
|
28 |
data_type: 'integer' |
28 |
data_type: 'tinyint' |
29 |
is_auto_increment: 1 |
|
|
30 |
is_nullable: 0 |
29 |
is_nullable: 0 |
31 |
|
30 |
|
32 |
primary key |
|
|
33 |
|
34 |
=head2 borrowernumber |
31 |
=head2 borrowernumber |
35 |
|
32 |
|
36 |
data_type: 'integer' |
33 |
data_type: 'tinyint' |
37 |
default_value: 0 |
|
|
38 |
is_foreign_key: 1 |
39 |
is_nullable: 0 |
34 |
is_nullable: 0 |
40 |
|
35 |
|
41 |
foreign key from the borrowers table defining which patron this hold is for |
|
|
42 |
|
43 |
=head2 reservedate |
36 |
=head2 reservedate |
44 |
|
37 |
|
45 |
data_type: 'date' |
38 |
data_type: 'tinyint' |
46 |
datetime_undef_if_invalid: 1 |
39 |
is_nullable: 0 |
47 |
is_nullable: 1 |
|
|
48 |
|
49 |
the date the hold was placed |
50 |
|
40 |
|
51 |
=head2 biblionumber |
41 |
=head2 biblionumber |
52 |
|
42 |
|
53 |
data_type: 'integer' |
43 |
data_type: 'tinyint' |
54 |
default_value: 0 |
|
|
55 |
is_foreign_key: 1 |
56 |
is_nullable: 0 |
44 |
is_nullable: 0 |
57 |
|
45 |
|
58 |
foreign key from the biblio table defining which bib record this hold is on |
|
|
59 |
|
60 |
=head2 branchcode |
46 |
=head2 branchcode |
61 |
|
47 |
|
62 |
data_type: 'varchar' |
48 |
data_type: 'tinyint' |
63 |
is_foreign_key: 1 |
49 |
is_nullable: 0 |
64 |
is_nullable: 1 |
|
|
65 |
size: 10 |
66 |
|
67 |
foreign key from the branches table defining which branch the patron wishes to pick this hold up at |
68 |
|
50 |
|
69 |
=head2 desk_id |
51 |
=head2 desk_id |
70 |
|
52 |
|
71 |
data_type: 'integer' |
53 |
data_type: 'tinyint' |
72 |
is_foreign_key: 1 |
54 |
is_nullable: 0 |
73 |
is_nullable: 1 |
|
|
74 |
|
75 |
foreign key from the desks table defining which desk the patron should pick this hold up at |
76 |
|
77 |
=head2 notificationdate |
78 |
|
79 |
data_type: 'date' |
80 |
datetime_undef_if_invalid: 1 |
81 |
is_nullable: 1 |
82 |
|
83 |
currently unused |
84 |
|
85 |
=head2 reminderdate |
86 |
|
87 |
data_type: 'date' |
88 |
datetime_undef_if_invalid: 1 |
89 |
is_nullable: 1 |
90 |
|
91 |
currently unused |
92 |
|
55 |
|
93 |
=head2 cancellationdate |
56 |
=head2 cancellationdate |
94 |
|
57 |
|
95 |
data_type: 'date' |
58 |
data_type: 'tinyint' |
96 |
datetime_undef_if_invalid: 1 |
59 |
is_nullable: 0 |
97 |
is_nullable: 1 |
|
|
98 |
|
99 |
the date this hold was cancelled |
100 |
|
60 |
|
101 |
=head2 cancellation_reason |
61 |
=head2 cancellation_reason |
102 |
|
62 |
|
103 |
data_type: 'varchar' |
63 |
data_type: 'tinyint' |
104 |
is_nullable: 1 |
64 |
is_nullable: 0 |
105 |
size: 80 |
|
|
106 |
|
107 |
optional authorised value CANCELLATION_REASON |
108 |
|
65 |
|
109 |
=head2 reservenotes |
66 |
=head2 reservenotes |
110 |
|
67 |
|
111 |
data_type: 'longtext' |
68 |
data_type: 'tinyint' |
112 |
is_nullable: 1 |
69 |
is_nullable: 0 |
113 |
|
|
|
114 |
notes related to this hold |
115 |
|
70 |
|
116 |
=head2 priority |
71 |
=head2 priority |
117 |
|
72 |
|
118 |
data_type: 'smallint' |
73 |
data_type: 'tinyint' |
119 |
default_value: 1 |
|
|
120 |
is_nullable: 0 |
74 |
is_nullable: 0 |
121 |
|
75 |
|
122 |
where in the queue the patron sits |
|
|
123 |
|
124 |
=head2 found |
76 |
=head2 found |
125 |
|
77 |
|
126 |
data_type: 'varchar' |
78 |
data_type: 'tinyint' |
127 |
is_nullable: 1 |
79 |
is_nullable: 0 |
128 |
size: 1 |
|
|
129 |
|
130 |
a one letter code defining what the status is of the hold is after it has been confirmed |
131 |
|
80 |
|
132 |
=head2 timestamp |
81 |
=head2 timestamp |
133 |
|
82 |
|
134 |
data_type: 'timestamp' |
83 |
data_type: 'tinyint' |
135 |
datetime_undef_if_invalid: 1 |
|
|
136 |
default_value: current_timestamp |
137 |
is_nullable: 0 |
84 |
is_nullable: 0 |
138 |
|
85 |
|
139 |
the date and time this hold was last updated |
|
|
140 |
|
141 |
=head2 itemnumber |
86 |
=head2 itemnumber |
142 |
|
87 |
|
143 |
data_type: 'integer' |
88 |
data_type: 'tinyint' |
144 |
is_foreign_key: 1 |
89 |
is_nullable: 0 |
145 |
is_nullable: 1 |
|
|
146 |
|
147 |
foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with |
148 |
|
90 |
|
149 |
=head2 waitingdate |
91 |
=head2 waitingdate |
150 |
|
92 |
|
151 |
data_type: 'date' |
93 |
data_type: 'tinyint' |
152 |
datetime_undef_if_invalid: 1 |
94 |
is_nullable: 0 |
153 |
is_nullable: 1 |
|
|
154 |
|
155 |
the date the item was marked as waiting for the patron at the library |
156 |
|
95 |
|
157 |
=head2 expirationdate |
96 |
=head2 expirationdate |
158 |
|
97 |
|
159 |
data_type: 'date' |
98 |
data_type: 'tinyint' |
160 |
datetime_undef_if_invalid: 1 |
99 |
is_nullable: 0 |
161 |
is_nullable: 1 |
|
|
162 |
|
163 |
the date the hold expires (usually the date entered by the patron to say they don't need the hold after a certain date) |
164 |
|
100 |
|
165 |
=head2 lowestPriority |
101 |
=head2 lowestPriority |
166 |
|
102 |
|
167 |
accessor: 'lowest_priority' |
103 |
accessor: 'lowest_priority' |
168 |
data_type: 'tinyint' |
104 |
data_type: 'tinyint' |
169 |
default_value: 0 |
|
|
170 |
is_nullable: 0 |
105 |
is_nullable: 0 |
171 |
|
106 |
|
172 |
=head2 suspend |
107 |
=head2 suspend |
173 |
|
108 |
|
174 |
data_type: 'tinyint' |
109 |
data_type: 'tinyint' |
175 |
default_value: 0 |
|
|
176 |
is_nullable: 0 |
110 |
is_nullable: 0 |
177 |
|
111 |
|
178 |
=head2 suspend_until |
112 |
=head2 suspend_until |
179 |
|
113 |
|
180 |
data_type: 'datetime' |
114 |
data_type: 'tinyint' |
181 |
datetime_undef_if_invalid: 1 |
115 |
is_nullable: 0 |
182 |
is_nullable: 1 |
|
|
183 |
|
116 |
|
184 |
=head2 itemtype |
117 |
=head2 itemtype |
185 |
|
118 |
|
186 |
data_type: 'varchar' |
119 |
data_type: 'tinyint' |
187 |
is_foreign_key: 1 |
120 |
is_nullable: 0 |
188 |
is_nullable: 1 |
|
|
189 |
size: 10 |
190 |
|
191 |
If record level hold, the optional itemtype of the item the patron is requesting |
192 |
|
121 |
|
193 |
=head2 item_level_hold |
122 |
=head2 item_level_hold |
194 |
|
123 |
|
195 |
data_type: 'tinyint' |
124 |
data_type: 'tinyint' |
196 |
default_value: 0 |
|
|
197 |
is_nullable: 0 |
125 |
is_nullable: 0 |
198 |
|
126 |
|
199 |
Is the hpld placed at item level |
|
|
200 |
|
201 |
=head2 non_priority |
127 |
=head2 non_priority |
202 |
|
128 |
|
203 |
data_type: 'tinyint' |
129 |
data_type: 'tinyint' |
204 |
default_value: 0 |
|
|
205 |
is_nullable: 0 |
130 |
is_nullable: 0 |
206 |
|
131 |
|
207 |
Is this a non priority hold |
|
|
208 |
|
209 |
=cut |
132 |
=cut |
210 |
|
133 |
|
211 |
__PACKAGE__->add_columns( |
134 |
__PACKAGE__->add_columns( |
212 |
"reserve_id", |
135 |
"reserve_id", |
213 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
136 |
{ data_type => "tinyint", is_nullable => 0 }, |
214 |
"borrowernumber", |
137 |
"borrowernumber", |
215 |
{ |
138 |
{ data_type => "tinyint", is_nullable => 0 }, |
216 |
data_type => "integer", |
|
|
217 |
default_value => 0, |
218 |
is_foreign_key => 1, |
219 |
is_nullable => 0, |
220 |
}, |
221 |
"reservedate", |
139 |
"reservedate", |
222 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
140 |
{ data_type => "tinyint", is_nullable => 0 }, |
223 |
"biblionumber", |
141 |
"biblionumber", |
224 |
{ |
142 |
{ data_type => "tinyint", is_nullable => 0 }, |
225 |
data_type => "integer", |
|
|
226 |
default_value => 0, |
227 |
is_foreign_key => 1, |
228 |
is_nullable => 0, |
229 |
}, |
230 |
"branchcode", |
143 |
"branchcode", |
231 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
144 |
{ data_type => "tinyint", is_nullable => 0 }, |
232 |
"desk_id", |
145 |
"desk_id", |
233 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
146 |
{ data_type => "tinyint", is_nullable => 0 }, |
234 |
"notificationdate", |
|
|
235 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
236 |
"reminderdate", |
237 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
238 |
"cancellationdate", |
147 |
"cancellationdate", |
239 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
148 |
{ data_type => "tinyint", is_nullable => 0 }, |
240 |
"cancellation_reason", |
149 |
"cancellation_reason", |
241 |
{ data_type => "varchar", is_nullable => 1, size => 80 }, |
150 |
{ data_type => "tinyint", is_nullable => 0 }, |
242 |
"reservenotes", |
151 |
"reservenotes", |
243 |
{ data_type => "longtext", is_nullable => 1 }, |
152 |
{ data_type => "tinyint", is_nullable => 0 }, |
244 |
"priority", |
153 |
"priority", |
245 |
{ data_type => "smallint", default_value => 1, is_nullable => 0 }, |
154 |
{ data_type => "tinyint", is_nullable => 0 }, |
246 |
"found", |
155 |
"found", |
247 |
{ data_type => "varchar", is_nullable => 1, size => 1 }, |
156 |
{ data_type => "tinyint", is_nullable => 0 }, |
248 |
"timestamp", |
157 |
"timestamp", |
249 |
{ |
158 |
{ data_type => "tinyint", is_nullable => 0 }, |
250 |
data_type => "timestamp", |
|
|
251 |
datetime_undef_if_invalid => 1, |
252 |
default_value => \"current_timestamp", |
253 |
is_nullable => 0, |
254 |
}, |
255 |
"itemnumber", |
159 |
"itemnumber", |
256 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
160 |
{ data_type => "tinyint", is_nullable => 0 }, |
257 |
"waitingdate", |
161 |
"waitingdate", |
258 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
162 |
{ data_type => "tinyint", is_nullable => 0 }, |
259 |
"expirationdate", |
163 |
"expirationdate", |
260 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
164 |
{ data_type => "tinyint", is_nullable => 0 }, |
261 |
"lowestPriority", |
165 |
"lowestPriority", |
262 |
{ |
166 |
{ accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 }, |
263 |
accessor => "lowest_priority", |
|
|
264 |
data_type => "tinyint", |
265 |
default_value => 0, |
266 |
is_nullable => 0, |
267 |
}, |
268 |
"suspend", |
167 |
"suspend", |
269 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
168 |
{ data_type => "tinyint", is_nullable => 0 }, |
270 |
"suspend_until", |
169 |
"suspend_until", |
271 |
{ |
170 |
{ data_type => "tinyint", is_nullable => 0 }, |
272 |
data_type => "datetime", |
|
|
273 |
datetime_undef_if_invalid => 1, |
274 |
is_nullable => 1, |
275 |
}, |
276 |
"itemtype", |
171 |
"itemtype", |
277 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, |
172 |
{ data_type => "tinyint", is_nullable => 0 }, |
278 |
"item_level_hold", |
173 |
"item_level_hold", |
279 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
174 |
{ data_type => "tinyint", is_nullable => 0 }, |
280 |
"non_priority", |
175 |
"non_priority", |
281 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
176 |
{ data_type => "tinyint", is_nullable => 0 }, |
282 |
); |
|
|
283 |
|
284 |
=head1 PRIMARY KEY |
285 |
|
286 |
=over 4 |
287 |
|
288 |
=item * L</reserve_id> |
289 |
|
290 |
=back |
291 |
|
292 |
=cut |
293 |
|
294 |
__PACKAGE__->set_primary_key("reserve_id"); |
295 |
|
296 |
=head1 RELATIONS |
297 |
|
298 |
=head2 biblionumber |
299 |
|
300 |
Type: belongs_to |
301 |
|
302 |
Related object: L<Koha::Schema::Result::Biblio> |
303 |
|
304 |
=cut |
305 |
|
306 |
__PACKAGE__->belongs_to( |
307 |
"biblionumber", |
308 |
"Koha::Schema::Result::Biblio", |
309 |
{ biblionumber => "biblionumber" }, |
310 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
311 |
); |
177 |
); |
312 |
|
178 |
|
313 |
=head2 borrowernumber |
|
|
314 |
|
315 |
Type: belongs_to |
316 |
|
317 |
Related object: L<Koha::Schema::Result::Borrower> |
318 |
|
319 |
=cut |
320 |
|
321 |
__PACKAGE__->belongs_to( |
322 |
"borrowernumber", |
323 |
"Koha::Schema::Result::Borrower", |
324 |
{ borrowernumber => "borrowernumber" }, |
325 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
326 |
); |
327 |
|
328 |
=head2 branchcode |
329 |
|
330 |
Type: belongs_to |
331 |
|
332 |
Related object: L<Koha::Schema::Result::Branch> |
333 |
|
179 |
|
334 |
=cut |
180 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-19 14:50:01 |
335 |
|
181 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iAJVTUfqX6QT29xY+QxPnA |
336 |
__PACKAGE__->belongs_to( |
|
|
337 |
"branchcode", |
338 |
"Koha::Schema::Result::Branch", |
339 |
{ branchcode => "branchcode" }, |
340 |
{ |
341 |
is_deferrable => 1, |
342 |
join_type => "LEFT", |
343 |
on_delete => "CASCADE", |
344 |
on_update => "CASCADE", |
345 |
}, |
346 |
); |
347 |
|
348 |
=head2 club_holds_to_patron_holds |
349 |
|
350 |
Type: has_many |
351 |
|
352 |
Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold> |
353 |
|
354 |
=cut |
355 |
|
356 |
__PACKAGE__->has_many( |
357 |
"club_holds_to_patron_holds", |
358 |
"Koha::Schema::Result::ClubHoldsToPatronHold", |
359 |
{ "foreign.hold_id" => "self.reserve_id" }, |
360 |
{ cascade_copy => 0, cascade_delete => 0 }, |
361 |
); |
362 |
|
363 |
=head2 desk |
364 |
|
365 |
Type: belongs_to |
366 |
|
367 |
Related object: L<Koha::Schema::Result::Desk> |
368 |
|
369 |
=cut |
370 |
|
182 |
|
371 |
__PACKAGE__->belongs_to( |
|
|
372 |
"desk", |
373 |
"Koha::Schema::Result::Desk", |
374 |
{ desk_id => "desk_id" }, |
375 |
{ |
376 |
is_deferrable => 1, |
377 |
join_type => "LEFT", |
378 |
on_delete => "SET NULL", |
379 |
on_update => "CASCADE", |
380 |
}, |
381 |
); |
382 |
|
383 |
=head2 itemnumber |
384 |
|
385 |
Type: belongs_to |
386 |
|
387 |
Related object: L<Koha::Schema::Result::Item> |
388 |
|
389 |
=cut |
390 |
|
391 |
__PACKAGE__->belongs_to( |
392 |
"itemnumber", |
393 |
"Koha::Schema::Result::Item", |
394 |
{ itemnumber => "itemnumber" }, |
395 |
{ |
396 |
is_deferrable => 1, |
397 |
join_type => "LEFT", |
398 |
on_delete => "CASCADE", |
399 |
on_update => "CASCADE", |
400 |
}, |
401 |
); |
402 |
|
403 |
=head2 itemtype |
404 |
|
405 |
Type: belongs_to |
406 |
|
407 |
Related object: L<Koha::Schema::Result::Itemtype> |
408 |
|
409 |
=cut |
410 |
|
411 |
__PACKAGE__->belongs_to( |
412 |
"itemtype", |
413 |
"Koha::Schema::Result::Itemtype", |
414 |
{ itemtype => "itemtype" }, |
415 |
{ |
416 |
is_deferrable => 1, |
417 |
join_type => "LEFT", |
418 |
on_delete => "CASCADE", |
419 |
on_update => "CASCADE", |
420 |
}, |
421 |
); |
422 |
|
423 |
|
424 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 |
425 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BlMb2M0MEmFuTiMSSBEseg |
426 |
|
427 |
__PACKAGE__->belongs_to( |
428 |
"item", |
429 |
"Koha::Schema::Result::Item", |
430 |
{ itemnumber => "itemnumber" }, |
431 |
{ |
432 |
is_deferrable => 1, |
433 |
join_type => "LEFT", |
434 |
on_delete => "CASCADE", |
435 |
on_update => "CASCADE", |
436 |
}, |
437 |
); |
438 |
|
439 |
__PACKAGE__->belongs_to( |
440 |
"biblio", |
441 |
"Koha::Schema::Result::Biblio", |
442 |
{ biblionumber => "biblionumber" }, |
443 |
{ |
444 |
is_deferrable => 1, |
445 |
join_type => "LEFT", |
446 |
on_delete => "CASCADE", |
447 |
on_update => "CASCADE", |
448 |
}, |
449 |
); |
450 |
|
451 |
__PACKAGE__->belongs_to( |
452 |
"patron", |
453 |
"Koha::Schema::Result::Borrower", |
454 |
{ "foreign.borrowernumber" => "self.borrowernumber" }, |
455 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
456 |
); |
457 |
|
458 |
__PACKAGE__->add_columns( |
459 |
'+item_level_hold' => { is_boolean => 1 }, |
460 |
'+lowestPriority' => { is_boolean => 1 }, |
461 |
'+suspend' => { is_boolean => 1 }, |
462 |
'+non_priority' => { is_boolean => 1 } |
463 |
); |
464 |
|
465 |
sub koha_object_class { |
466 |
'Koha::Hold'; |
467 |
} |
468 |
sub koha_objects_class { |
469 |
'Koha::Holds'; |
470 |
} |
471 |
|
472 |
__PACKAGE__->belongs_to( |
473 |
"itembib", |
474 |
"Koha::Schema::Result::Item", |
475 |
{ biblionumber => "biblionumber" }, |
476 |
{ |
477 |
is_deferrable => 1, |
478 |
join_type => "LEFT", |
479 |
on_delete => "CASCADE", |
480 |
on_update => "CASCADE", |
481 |
}, |
482 |
); |
483 |
|
183 |
|
|
|
184 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
484 |
1; |
185 |
1; |
485 |
- |
|
|